Lines Matching refs:slot
82 ck_bytelock_write_lock(struct ck_bytelock *bytelock, unsigned int slot)
88 while (ck_pr_cas_uint(&bytelock->owner, 0, slot) == false)
92 if (slot <= sizeof bytelock->readers)
93 ck_pr_store_8(&bytelock->readers[slot - 1], false);
128 ck_bytelock_read_lock(struct ck_bytelock *bytelock, unsigned int slot)
131 if (ck_pr_load_uint(&bytelock->owner) == slot) {
132 ck_pr_store_8(&bytelock->readers[slot - 1], true);
139 if (slot > sizeof bytelock->readers) {
155 slot -= 1;
158 ck_pr_fas_8(&bytelock->readers[slot], true);
161 ck_pr_store_8(&bytelock->readers[slot], true);
166 * If there is no owner at this point, our slot has
173 ck_pr_store_8(&bytelock->readers[slot], false);
183 ck_bytelock_read_unlock(struct ck_bytelock *bytelock, unsigned int slot)
188 if (slot > sizeof bytelock->readers)
191 ck_pr_store_8(&bytelock->readers[slot - 1], false);