@@ -13,11 +13,11 @@ * file. */ #include "config.h" -#import "tlskey.h" +#import "OFTLSKey.h" #include #include /* @@ -24,11 +24,11 @@ * As we use this file in both the runtime and ObjFW, and since AmigaOS always * has the runtime, use the hashtable from the runtime. */ #import "runtime/private.h" -static of_tlskey_t firstKey = NULL, lastKey = NULL; +static OFTLSKey firstKey = NULL, lastKey = NULL; static struct SignalSemaphore semaphore; static bool semaphoreInitialized = false; static uint32_t hashFunc(const void *ptr) @@ -49,11 +49,11 @@ semaphoreInitialized = true; } } int -of_tlskey_new(of_tlskey_t *key) +OFTLSKeyNew(OFTLSKey *key) { if (!semaphoreInitialized) { /* * We might be called from another constructor, while ours has * not run yet. This is safe, as the constructor is definitely @@ -87,11 +87,11 @@ /* We create the hash table lazily. */ return 0; } int -of_tlskey_free(of_tlskey_t key) +OFTLSKeyFree(OFTLSKey key) { ObtainSemaphore(&semaphore); @try { if (key->previous != NULL) key->previous->next = key->next; @@ -111,11 +111,11 @@ return 0; } void * -of_tlskey_get(of_tlskey_t key) +OFTLSKeyGet(OFTLSKey key) { void *ret; ObtainSemaphore(&semaphore); @try { @@ -129,11 +129,11 @@ return ret; } int -of_tlskey_set(of_tlskey_t key, void *ptr) +OFTLSKeySet(OFTLSKey key, void *ptr) { ObtainSemaphore(&semaphore); @try { struct Task *task = FindTask(NULL); @@ -150,19 +150,18 @@ return 0; } void -of_tlskey_thread_exited(void) +OFTLSKeyThreadExited(void) { ObtainSemaphore(&semaphore); @try { struct Task *task = FindTask(NULL); - for (of_tlskey_t iter = firstKey; iter != NULL; - iter = iter->next) + for (OFTLSKey iter = firstKey; iter != NULL; iter = iter->next) if (iter->table != NULL) objc_hashtable_delete(iter->table, task); } @finally { ReleaseSemaphore(&semaphore); } }