aboutsummaryrefslogtreecommitdiff
path: root/rt
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-08-16 01:07:14 +0000
committerUlrich Drepper <drepper@redhat.com>2000-08-16 01:07:14 +0000
commited2d7a57e53fd8cb0575eee0077c55aa4e0641a0 (patch)
tree392a8ad074a14aee13521d8b6ffab01bef34b27b /rt
parentdee6b86d37aedb94708d963e6fea80ea1050969b (diff)
downloadglibc-ed2d7a57e53fd8cb0575eee0077c55aa4e0641a0.tar
glibc-ed2d7a57e53fd8cb0575eee0077c55aa4e0641a0.tar.gz
glibc-ed2d7a57e53fd8cb0575eee0077c55aa4e0641a0.tar.bz2
glibc-ed2d7a57e53fd8cb0575eee0077c55aa4e0641a0.zip
(notify_func_wrapper): Wrapper function to call thread event callback function. (__aio_notify_only): Use function above.
Diffstat (limited to 'rt')
-rw-r--r--rt/aio_notify.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/rt/aio_notify.c b/rt/aio_notify.c
index 54e9959bfa..558b2d2451 100644
--- a/rt/aio_notify.c
+++ b/rt/aio_notify.c
@@ -1,5 +1,5 @@
/* Notify initiator of AIO request.
- Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -23,6 +23,16 @@
#include <stdlib.h>
#include "aio_misc.h"
+
+static void *
+notify_func_wrapper (void *arg)
+{
+ struct sigevent *sigev = arg;
+ sigev->sigev_notify_function (sigev->sigev_value);
+ return NULL;
+}
+
+
int
internal_function
__aio_notify_only (struct sigevent *sigev, pid_t caller_pid)
@@ -44,9 +54,7 @@ __aio_notify_only (struct sigevent *sigev, pid_t caller_pid)
pattr = &attr;
}
- if (pthread_create (&tid, pattr,
- (void *(*) (void *)) sigev->sigev_notify_function,
- sigev->sigev_value.sival_ptr) < 0)
+ if (pthread_create (&tid, pattr, notify_func_wrapper, sigev) < 0)
result = -1;
}
else if (sigev->sigev_notify == SIGEV_SIGNAL)