LibC: Implement blocking pthread_rwlock
pthread_rwlock now uses a mutex and condition variable internally so it doesn't need to yield while waiting!
This commit is contained in:
@@ -67,9 +67,11 @@ typedef struct
|
||||
} pthread_rwlockattr_t;
|
||||
typedef struct
|
||||
{
|
||||
pthread_rwlockattr_t attr;
|
||||
unsigned lockers;
|
||||
unsigned writers;
|
||||
pthread_mutex_t lock;
|
||||
pthread_cond_t cond;
|
||||
unsigned writers_waiting;
|
||||
unsigned writer_active;
|
||||
unsigned readers_active;
|
||||
} pthread_rwlock_t;
|
||||
|
||||
__END_DECLS
|
||||
|
||||
Reference in New Issue
Block a user