winpr/synch: fix mutex implementation
authorNorbert Federa <norbert.federa@thincast.com>
Tue, 24 May 2016 11:35:11 +0000 (13:35 +0200)
committerNorbert Federa <norbert.federa@thincast.com>
Tue, 24 May 2016 13:10:57 +0000 (15:10 +0200)
commit386d29001571bd7c504a2a18a588afe997b77e11
tree99f4ec4b4beb631bba0ed659766177c22fa9dcc7
parentcf127ebfb9c7ebf0c8c57c8da6746d481e08d6db
winpr/synch: fix mutex implementation

- Mutex is recursive on Windows; as a consequence we have to use
  the pthread PTHREAD_MUTEX_RECURSIVE type
- Adapt MutexCloseHandle accordingly
- ReleaseMutex returned TRUE even if pthread_mutex_unlock failed
- Fixed and improved the TestSynchMutex ctest
winpr/libwinpr/synch/mutex.c
winpr/libwinpr/synch/test/TestSynchMutex.c