| 97 | #endif |
| 98 | |
| 99 | static void set_thread_wait_handler(wait_handler handler) |
| 100 | { |
| 101 | #if defined(EMULATE_PTHREAD_THREAD_LOCAL) |
| 102 | // we need to call this here, because the pthread initializer is lazy, |
| 103 | // this means the it could be null and we need to set it before trying to |
| 104 | // get or set it |
| 105 | pthread_setspecific(get_thread_wait_handler_key(), reinterpret_cast<void*>(handler)); |
| 106 | #else |
| 107 | thread_wait_handler = handler; |
| 108 | #endif |
| 109 | } |
| 110 | |
| 111 | static wait_handler get_thread_wait_handler() |
| 112 | { |
no test coverage detected