This is the mail archive of the
mailing list for the pthreas-win32 project.
mutex_lock on solaris vs. winnt
- To: pthreads-win32 at sourceware dot cygnus dot com
- Subject: mutex_lock on solaris vs. winnt
- From: Hung Huynh <Hung dot Huynh at emw dot ericsson dot se>
- Date: Thu, 27 Jul 2000 18:37:22 +0200
- Organization: Ericsson Microwave Systems AB
I'm trying to port some code from unix (solaris) to windows nt.
The code uses pthread mutexes to create a binary semaphore for
reading (many-at-a-time) and writing (one-at-a-time).
I have just found out that if you in unix do pthread_unix_lock
twice on the same mutex, and in the same process, you will lock. But
trying to do the same thing in windows nt (with pthread-win32 released
won't give the same behaviour. Is this because the WaitForSingleObject
will allow multiple locks in the same process? Should it be like this or
something that is just not yet implemented in pthread-win32?
As you can tell I'm a newbie, and i'll appreciate very much any
on this. Thank you in advance.