src/platform_posix.c
changeset 1238 97d4522cdf02
parent 1228 7c0e9de2ba33
child 1240 22d4d1bd4e21
equal deleted inserted replaced
1237:6d8b32355a28 1238:97d4522cdf02
   442 
   442 
   443 
   443 
   444 void __PHYSFS_platformReleaseMutex(void *mutex)
   444 void __PHYSFS_platformReleaseMutex(void *mutex)
   445 {
   445 {
   446     PthreadMutex *m = (PthreadMutex *) mutex;
   446     PthreadMutex *m = (PthreadMutex *) mutex;
       
   447     assert(m->owner == pthread_self());  /* catch programming errors. */
       
   448     assert(m->count > 0);  /* catch programming errors. */
   447     if (m->owner == pthread_self())
   449     if (m->owner == pthread_self())
   448     {
   450     {
   449         if (--m->count == 0)
   451         if (--m->count == 0)
   450         {
   452         {
   451             m->owner = (pthread_t) 0xDEADBEEF;
   453             m->owner = (pthread_t) 0xDEADBEEF;