include/SDL_thread.h
changeset 9125 e004bdb812ce
parent 8149 681eb46b8ac4
child 9619 b94b6d0bff0f
equal deleted inserted replaced
9123:bad450d761eb 9125:e004bdb812ce
   231  *      if (!thread_local_storage) {
   231  *      if (!thread_local_storage) {
   232  *          SDL_AtomicLock(&tls_lock);
   232  *          SDL_AtomicLock(&tls_lock);
   233  *          if (!thread_local_storage) {
   233  *          if (!thread_local_storage) {
   234  *              thread_local_storage = SDL_TLSCreate();
   234  *              thread_local_storage = SDL_TLSCreate();
   235  *          }
   235  *          }
   236  *          SDL_AtomicUnLock(&tls_lock);
   236  *          SDL_AtomicUnlock(&tls_lock);
   237  *      }
   237  *      }
   238  *      SDL_TLSSet(thread_local_storage, value);
   238  *      SDL_TLSSet(thread_local_storage, value, 0);
   239  *  }
   239  *  }
   240  *  
   240  *  
   241  *  void *GetMyThreadData(void)
   241  *  void *GetMyThreadData(void)
   242  *  {
   242  *  {
   243  *      return SDL_TLSGet(thread_local_storage);
   243  *      return SDL_TLSGet(thread_local_storage);