|
version 1.21.2.6, 2013/11/15 09:09:39
|
version 1.22.6.2, 2014/01/28 14:04:57
|
|
Line 12 terms:
|
Line 12 terms:
|
| All of the documentation and software included in the ELWIX and AITNET |
All of the documentation and software included in the ELWIX and AITNET |
| Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org> |
Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org> |
| |
|
| Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 | Copyright 2004 - 2014 |
| by Michael Pounov <misho@elwix.org>. All rights reserved. |
by Michael Pounov <misho@elwix.org>. All rights reserved. |
| |
|
| Redistribution and use in source and binary forms, with or without |
Redistribution and use in source and binary forms, with or without |
|
Line 66 static sched_task_func_t cbProto[SOCK_RAW + 1][4] = {
|
Line 66 static sched_task_func_t cbProto[SOCK_RAW + 1][4] = {
|
| { NULL, NULL, NULL, NULL } /* SOCK_RAW */ |
{ NULL, NULL, NULL, NULL } /* SOCK_RAW */ |
| }; |
}; |
| |
|
| |
/* Global Signal Argument when kqueue support disabled */ |
| |
|
| |
static volatile uintptr_t _glSigArg = 0; |
| |
|
| |
|
| void |
void |
| rpc_freeCli(rpc_cli_t * __restrict c) |
rpc_freeCli(rpc_cli_t * __restrict c) |
| { |
{ |
|
Line 760 end:
|
Line 764 end:
|
| static void * |
static void * |
| flushBLOB(sched_task_t *task) |
flushBLOB(sched_task_t *task) |
| { |
{ |
| rpc_srv_t *srv = TASK_ARG(task); | uintptr_t sigArg = atomic_load_acq_ptr(&_glSigArg); |
| | rpc_srv_t *srv = sigArg ? (void*) sigArg : TASK_ARG(task); |
| rpc_blob_t *b, *tmp; |
rpc_blob_t *b, *tmp; |
| |
|
| TAILQ_FOREACH_SAFE(b, &srv->srv_blob.blobs, blob_node, tmp) { |
TAILQ_FOREACH_SAFE(b, &srv->srv_blob.blobs, blob_node, tmp) { |
|
Line 770 flushBLOB(sched_task_t *task)
|
Line 775 flushBLOB(sched_task_t *task)
|
| e_free(b); |
e_free(b); |
| } |
} |
| |
|
| schedSignalSelf(task); | if (!schedSignalSelf(task)) { |
| | /* disabled kqueue support in libaitsched */ |
| | struct sigaction sa; |
| | |
| | memset(&sa, 0, sizeof sa); |
| | sigemptyset(&sa.sa_mask); |
| | sa.sa_handler = (void (*)(int)) flushBLOB; |
| | sa.sa_flags = SA_RESTART | SA_RESETHAND; |
| | sigaction(SIGFBLOB, &sa, NULL); |
| | } |
| | |
| return NULL; |
return NULL; |
| } |
} |
| |
|
|
Line 984 rpc_srv_loopBLOBServer(rpc_srv_t * __restrict srv)
|
Line 999 rpc_srv_loopBLOBServer(rpc_srv_t * __restrict srv)
|
| return -1; |
return -1; |
| } |
} |
| |
|
| schedSignal(srv->srv_blob.root, flushBLOB, srv, SIGFBLOB, NULL, 0); | if (!schedSignal(srv->srv_blob.root, flushBLOB, srv, SIGFBLOB, NULL, 0)) { |
| | /* disabled kqueue support in libaitsched */ |
| | struct sigaction sa; |
| | |
| | atomic_store_rel_ptr(&_glSigArg, (uintptr_t) srv); |
| | |
| | memset(&sa, 0, sizeof sa); |
| | sigemptyset(&sa.sa_mask); |
| | sa.sa_handler = (void (*)(int)) flushBLOB; |
| | sa.sa_flags = SA_RESTART | SA_RESETHAND; |
| | sigaction(SIGFBLOB, &sa, NULL); |
| | } |
| | |
| if (!schedRead(srv->srv_blob.root, acceptBLOBClients, srv, |
if (!schedRead(srv->srv_blob.root, acceptBLOBClients, srv, |
| srv->srv_blob.server.cli_sock, NULL, 0)) { |
srv->srv_blob.server.cli_sock, NULL, 0)) { |
| rpc_SetErr(sched_GetErrno(), "%s", sched_GetError()); |
rpc_SetErr(sched_GetErrno(), "%s", sched_GetError()); |