Switch pthread_rwlock_t to stdatomic.

Bug: 19099838
Change-Id: Ie82967a60b5cec61a8bdd1e0e4a03738d01944f8
This commit is contained in:
Yabin Cui
2015-02-11 17:04:36 -08:00
parent ee17e88004
commit 08ee8d2030
3 changed files with 227 additions and 90 deletions

View File

@@ -91,10 +91,10 @@ typedef struct {
pthread_mutex_t __unused_lock;
pthread_cond_t __unused_cond;
#endif
volatile int32_t state; // 0=unlock, -1=writer lock, +n=reader lock
volatile int32_t writer_thread_id;
volatile int32_t pending_readers;
volatile int32_t pending_writers;
int32_t state; // 0=unlock, -1=writer lock, +n=reader lock
int32_t writer_thread_id;
uint32_t pending_readers;
uint32_t pending_writers;
int32_t attr;
#ifdef __LP64__
char __reserved[36];