![]() ![]() |
![]() |
1 krisbash 1.1 #include "tls.h" 2 3 _Return_type_success_(return == 0) int TLS_Init_Injected( 4 _Out_ TLS* self, 5 NitsCallSite cs) 6 { 7 if (NitsShouldFault(cs, NitsAutomatic)) 8 return -1; 9 10 #if defined(_MSC_VER) 11 self->index = TlsAlloc(); 12 return self->index == TLS_OUT_OF_INDEXES ? -1 : 0; 13 #else 14 return pthread_key_create(&self->key, NULL) == 0 ? 0 : -1; 15 #endif 16 } |
ViewCVS 0.9.2 |