src/thread/pthread/SDL_sysmutex.c
changeset 6985 a0f905ecdda3
parent 6977 b73d51026c68
child 7037 3fedf1f25b94
equal deleted inserted replaced
6984:ae9c4b12f3e2 6985:a0f905ecdda3
   132     }
   132     }
   133 
   133 
   134     retval = 0;
   134     retval = 0;
   135 #if FAKE_RECURSIVE_MUTEX
   135 #if FAKE_RECURSIVE_MUTEX
   136     this_thread = pthread_self();
   136     this_thread = pthread_self();
   137     if (mutex->owner == this_thead) {
   137     if (mutex->owner == this_thread) {
   138         ++mutex->recursive;
   138         ++mutex->recursive;
   139     } else {
   139     } else {
   140         /* The order of operations is important.
   140         /* The order of operations is important.
   141          We set the locking thread id after we obtain the lock
   141          We set the locking thread id after we obtain the lock
   142          so unlocks from other threads will fail.
   142          so unlocks from other threads will fail.