This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: problem in aio_notify.c in glibc 2.1.92?
- To: Kaz Kylheku <kaz at ashi dot footprints dot net>
- Subject: Re: problem in aio_notify.c in glibc 2.1.92?
- From: "Kevin B. Hendricks" <khendricks at ivey dot uwo dot ca>
- Date: Tue, 15 Aug 2000 15:49:35 -0400
- CC: Geoff Keating <geoffk at cygnus dot com>, libc-alpha at sourceware dot cygnus dot com, howarth at bromo dot med dot uc dot edu
- References: <Pine.LNX.4.10.10008150913000.27630-100000@ashi.FootPrints.net>
Hi Kaz,
Okay, I tested your patch and it works fine and tst-aio5 now passes with flying
colors on ppc.
Thanks alot for your help.
For the record, here is the patch you sent to me.
--- aio_notify.c.prev Sat Aug 12 16:51:33 2000
+++ aio_notify.c Tue Aug 15 15:42:19 2000
@@ -23,6 +23,15 @@
#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 0;
+}
+
+
int
internal_function
__aio_notify_only (struct sigevent *sigev, pid_t caller_pid)
@@ -44,9 +53,7 @@
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)