#include "objfw-defs.h"
#include <errno.h>
#include "platform.h"
#import "macros.h"
#include <pthread.h>
Go to the source code of this file.
|
int | OFTLSKeyNew (OFTLSKey *key) |
| Creates a new Thread Local Storage key. More...
|
|
int | OFTLSKeyFree (OFTLSKey key) |
| Destroys the specified Thread Local Storage key. More...
|
|
static OF_INLINE void * | OFTLSKeyGet (OFTLSKey key) |
| Returns the current value for the specified Thread Local Storage key. More...
|
|
static OF_INLINE int | OFTLSKeySet (OFTLSKey key, void *value) |
| Sets the current value for the specified Thread Local Storage key. More...
|
|
◆ OFTLSKeyFree()
int OFTLSKeyFree |
( |
OFTLSKey |
key | ) |
|
Destroys the specified Thread Local Storage key.
- Parameters
-
key | A pointer to the key to destroy |
- Returns
- 0 on success, or an error number from
<errno.h>
on error
◆ OFTLSKeyGet()
static OF_INLINE void* OFTLSKeyGet |
( |
OFTLSKey |
key | ) |
|
|
static |
Returns the current value for the specified Thread Local Storage key.
- Parameters
-
key | A pointer to the key whose value to return |
- Returns
- The current value for the specified Thread Local Storage key
◆ OFTLSKeyNew()
int OFTLSKeyNew |
( |
OFTLSKey * |
key | ) |
|
Creates a new Thread Local Storage key.
- Parameters
-
key | A pointer to the key to create |
- Returns
- 0 on success, or an error number from
<errno.h>
on error
◆ OFTLSKeySet()
static OF_INLINE int OFTLSKeySet |
( |
OFTLSKey |
key, |
|
|
void * |
value |
|
) |
| |
|
static |
Sets the current value for the specified Thread Local Storage key.
- Parameters
-
key | A pointer to the key whose value to set |
value | The new value for the key |