Differences From Artifact [0f3980a25d]:
- File src/OFTLSKey.h — part of check-in [7413a728a7] at 2024-04-03 02:16:03 on branch trunk — Change license to LGPLv3 only (user: js, size: 2443) [annotate] [blame] [check-ins using] [more...]
To Artifact [4742ef8bb4]:
- File
src/OFTLSKey.h
— part of check-in
[0c3c3b6efa]
at
2024-05-01 15:19:55
on branch trunk
— Document a lot of undocumented functions & macros
Also fixes Doxygen not creating documentation for `static OF_INLINE`
functions. (user: js, size: 3258) [annotate] [blame] [check-ins using] [more...]
︙ | |||
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | + + + + + + + + + + + + + + + - + + + + + + + + + + + + + - + - + - + - + - + - + - + | #if !defined(OF_HAVE_THREADS) || \ (!defined(OF_HAVE_PTHREADS) && !defined(OF_WINDOWS) && !defined(OF_AMIGAOS)) # error No thread-local storage available! #endif #import "macros.h" /** @file */ #if defined(OF_HAVE_PTHREADS) # include <pthread.h> typedef pthread_key_t OFTLSKey; #elif defined(OF_WINDOWS) # include <windows.h> typedef DWORD OFTLSKey; #elif defined(OF_MORPHOS) # include <proto/exec.h> typedef ULONG OFTLSKey; #elif defined(OF_AMIGAOS) typedef struct _OFTLSKey { struct objc_hashtable *table; struct _OFTLSKey *next, *previous; } *OFTLSKey; #endif #ifdef __cplusplus extern "C" { #endif /** * @brief Creates a new Thread Local Storage key. * * @param key A pointer to the key to create * @return 0 on success, or an error number from `<errno.h>` on error */ extern int OFTLSKeyNew(OFTLSKey *key); /** * @brief Destroys the specified Thread Local Storage key. * * @param key A pointer to the key to destroy * @return 0 on success, or an error number from `<errno.h>` on error */ extern int OFTLSKeyFree(OFTLSKey key); #ifdef __cplusplus } #endif /* TLS keys are inlined for performance. */ |