Differences From Artifact [bf8d4b8a75]:
- File src/tlskey.h — part of check-in [abaf310373] at 2019-08-01 21:31:25 on branch trunk — Add thread-local storage for AmigaOS (user: js, size: 2295) [annotate] [blame] [check-ins using]
To Artifact [a0b1148f7c]:
- File
src/tlskey.h
— part of check-in
[acc67b0bb6]
at
2019-08-02 02:16:04
on branch trunk
— tlskey: Create OFMapTable lazily
of_tlskey_new() is called in constructors, but at that time, OFMapTable
might not be available yet. (user: js, size: 2033) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
30 31 32 33 34 35 36 | # include <pthread.h> typedef pthread_key_t of_tlskey_t; #elif defined(OF_WINDOWS) # include <windows.h> typedef DWORD of_tlskey_t; #elif defined(OF_AMIGAOS) # include <proto/exec.h> | | > > | | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | # include <pthread.h> typedef pthread_key_t of_tlskey_t; #elif defined(OF_WINDOWS) # include <windows.h> typedef DWORD of_tlskey_t; #elif defined(OF_AMIGAOS) # include <proto/exec.h> @class OFMapTable; typedef struct { OFMapTable *mapTable; } *of_tlskey_t; #endif #ifdef __cplusplus extern "C" { #endif extern bool of_tlskey_new(of_tlskey_t *key); extern bool of_tlskey_free(of_tlskey_t key); |
︙ | ︙ | |||
70 71 72 73 74 75 76 | static OF_INLINE bool of_tlskey_set(of_tlskey_t key, void *ptr) { return TlsSetValue(key, ptr); } #elif defined(OF_AMIGAOS) | < < < < | < < < < < < | | < | < > | < < < < | < < < < < < < < < | | < < | 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | static OF_INLINE bool of_tlskey_set(of_tlskey_t key, void *ptr) { return TlsSetValue(key, ptr); } #elif defined(OF_AMIGAOS) /* Those are too big too inline. */ # ifdef __cplusplus extern "C" { # endif extern void *of_tlskey_get(of_tlskey_t key); extern bool of_tlskey_set(of_tlskey_t key, void *ptr); # ifdef __cplusplus } # endif #endif |