Lines Matching full:readers
48 uint8_t readers[CK_MD_CACHELINE - sizeof(unsigned int) * 2] CK_CC_ALIGN(8); member
62 for (i = 0; i < sizeof bytelock->readers; i++) in ck_bytelock_init()
63 bytelock->readers[i] = false; in ck_bytelock_init()
84 CK_BYTELOCK_TYPE *readers = (void *)bytelock->readers; in ck_bytelock_write_lock() local
92 if (slot <= sizeof bytelock->readers) in ck_bytelock_write_lock()
93 ck_pr_store_8(&bytelock->readers[slot - 1], false); in ck_bytelock_write_lock()
96 * Wait for slotted readers to drain out. This also provides the in ck_bytelock_write_lock()
101 for (i = 0; i < sizeof(bytelock->readers) / CK_BYTELOCK_LENGTH; i++) { in ck_bytelock_write_lock()
102 while (CK_BYTELOCK_LOAD(&readers[i]) != false) in ck_bytelock_write_lock()
106 /* Wait for unslotted readers to drain out. */ in ck_bytelock_write_lock()
132 ck_pr_store_8(&bytelock->readers[slot - 1], true); in ck_bytelock_read_lock()
138 /* Unslotted threads will have to use the readers counter. */ in ck_bytelock_read_lock()
139 if (slot > sizeof bytelock->readers) { in ck_bytelock_read_lock()
158 ck_pr_fas_8(&bytelock->readers[slot], true); in ck_bytelock_read_lock()
161 ck_pr_store_8(&bytelock->readers[slot], true); in ck_bytelock_read_lock()
173 ck_pr_store_8(&bytelock->readers[slot], false); in ck_bytelock_read_lock()
188 if (slot > sizeof bytelock->readers) in ck_bytelock_read_unlock()
191 ck_pr_store_8(&bytelock->readers[slot - 1], false); in ck_bytelock_read_unlock()