Do PTHREAD_PROCESS_SHARED mutexes/condvars work?
Chris McFarlen <[email protected]>
| Newsgroups | gmane.linux.ngpt.devel |
|---|---|
| Message-ID | <2980AA0FAAAE6B4DB3E9126F4451E740025C0076@dalxch02.dal.t-netix.com> |
I need to do some process syncronization, but the PTHREAD_PROCESS_SHARED attribute does not seem to work. I am using NGPT 2.0.4, and I have tried a stock 2.4.19 with the futex patch, and a 2.5.43 development kernel. Both kernel versions have the same results. I have some test code that yields the error, and I have made one modification to test_str03.c that also shows the error. The error comes from pthread_mutex_lock() when the mutex is locked by another process (the mutex data is shared via shared memory, and initialized with an attribute that has PTHREAD_PROCESS_SHARED set). The error is EDEADLK. I can post the test code I have and the change to get test_str03 to fail, if there is interest in helping out. But I wanted to make sure that NGPT tries to support PTHREAD_PROCESS_SHARED before I posted all of that. The documentation seems to say that NGPT does and does not support PTHREAD_PROCESS_SHARED in different places(there is a test for the case, test_str03, but you have to supply a -s parameter, and then that really doesn't work anyway...). Thanks, Chris McFarlen T-NETIX, Inc.