mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 02:07:35 +00:00
LibPthread: Implement pthread_spinlock_t API.
This change implements the pthread user space spinlock API. The stress-ng Port requires a functioning version to work correctly. To facilitate the requirements of the posix specification for the API we implement the spinlock so that the owning tid is the value stored in the spinlock. This gives us the proper ownership semantics needed to implement the proper error handling.
This commit is contained in:
parent
5b6f36dfea
commit
9f07627f58
2 changed files with 46 additions and 11 deletions
|
@ -84,7 +84,9 @@ typedef struct __pthread_cond_t {
|
|||
|
||||
typedef uint64_t pthread_rwlock_t;
|
||||
typedef void* pthread_rwlockattr_t;
|
||||
typedef void* pthread_spinlock_t;
|
||||
typedef struct __pthread_spinlock_t {
|
||||
int m_lock;
|
||||
} pthread_spinlock_t;
|
||||
typedef struct __pthread_condattr_t {
|
||||
int clockid; // clockid_t
|
||||
} pthread_condattr_t;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue