This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: problem in aio_notify.c in glibc 2.1.92?


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)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]