1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 13:37:44 +00:00

LibPthread: Implement simple thread-specific keys

This patch adds pthread_key_create() and pthread_{get,set}specific().
There's a maximum of 64 thread-specific keys for simplicity.

Key destructors are not invoked on thread exit.
This commit is contained in:
Andreas Kling 2019-12-07 15:19:56 +01:00
parent 2b45b7a45c
commit 615553be5f
2 changed files with 55 additions and 1 deletions

View file

@ -61,7 +61,7 @@ struct utimbuf {
};
typedef int pthread_t;
typedef void* pthread_key_t;
typedef int pthread_key_t;
typedef void* pthread_once_t;
typedef uint32_t pthread_mutex_t;
typedef void* pthread_attr_t;