diff options
author | Volker Lendecke <vl@samba.org> | 2008-02-24 11:39:57 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-02-24 11:39:57 +0100 |
commit | 9a069d306bb6f8a2cd51b8ba87b433884942d13f (patch) | |
tree | 222506fc0db0df4a267bdb044f8d0da7e2189d45 /source/smbd/aio.c | |
parent | 213ba3a719e77979c04b872f1d82f68e87287cb0 (diff) | |
download | samba-9a069d306bb6f8a2cd51b8ba87b433884942d13f.tar.gz samba-9a069d306bb6f8a2cd51b8ba87b433884942d13f.tar.xz samba-9a069d306bb6f8a2cd51b8ba87b433884942d13f.zip |
Export aio_request_done()
This is for external modules implementing the Posix AIO API that not
necessarily depend on the signal mechanism to indicate completion.
Diffstat (limited to 'source/smbd/aio.c')
-rw-r--r-- | source/smbd/aio.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/smbd/aio.c b/source/smbd/aio.c index 59dd9a9568b..78189d32f78 100644 --- a/source/smbd/aio.c +++ b/source/smbd/aio.c @@ -150,12 +150,18 @@ static uint16 aio_pending_array[AIO_PENDING_SIZE]; Signal handler when an aio request completes. *****************************************************************************/ -static void signal_handler(int sig, siginfo_t *info, void *unused) +void aio_request_done(uint16_t mid) { if (signals_received < AIO_PENDING_SIZE) { - aio_pending_array[signals_received] = info->si_value.sival_int; + aio_pending_array[signals_received] = mid; signals_received++; - } /* Else signal is lost. */ + } + /* Else signal is lost. */ +} + +static void signal_handler(int sig, siginfo_t *info, void *unused) +{ + aio_request_done(info->si_value.sival_int); sys_select_signal(RT_SIGNAL_AIO); } |