| 119 | } |
| 120 | |
| 121 | int pthread_setspecific(pthread_key_t key, const void* value) { |
| 122 | if (key == 0) { |
| 123 | return EINVAL; |
| 124 | } |
| 125 | return TlsSetValue((DWORD)(key - 1), (LPVOID)value) ? 0 : EINVAL; |
| 126 | } |
| 127 | |
| 128 | /* --- threads --- */ |
| 129 | struct cn1_thread_start { |