state of process shared cond vars?
Luke Elliott <[email protected]> Wed, 19 Nov 2003 18:39:55 -0600
| Newsgroups | gmane.comp.lib.phil |
|---|---|
| Message-ID | <[email protected]> |
Am I correct in thinking that if using cross-process shared cond vars and pthread_cond_broadcast(), NPTL expects the cond var's mutex to be mapped to the same address in each process? If I force the virtual address of the mutex to be different "enough", and run strace, I get the following error: futex(0x40161028, FUTEX_REQUEUE, 1, 2147483647, 0x40116000) = -1 EFAULT (Bad address) After cursory glance at the generic c code for pthread_cond_broadcast() and pthread_cond_wait() it looks like the mutex provided to wait() is used by broadcast(). If this is the case, is there any plan to change this behaviour? I notice the test cases for shared cond vars use fork() to start the second process, so automatically have the mutex mapped to the same address and hence will not fail in this way. I am using Fedora Core 1 (NPTL 0.60) with a 2.6.0-test9 kernel. Any insight gratefully appreciated Regards Luke Elliott.