Lines Matching +full:loss +full:- +full:of +full:- +full:lock
2 * Copyright 2010-2015 Samy Al Bahra.
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
11 * notice, this list of conditions and the following disclaimer in the
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
49 ck_spinlock_cas_init(struct ck_spinlock_cas *lock) in ck_spinlock_cas_init() argument
52 lock->value = false; in ck_spinlock_cas_init()
58 ck_spinlock_cas_trylock(struct ck_spinlock_cas *lock) in ck_spinlock_cas_trylock() argument
62 value = ck_pr_fas_uint(&lock->value, true); in ck_spinlock_cas_trylock()
68 ck_spinlock_cas_locked(struct ck_spinlock_cas *lock) in ck_spinlock_cas_locked() argument
70 bool r = ck_pr_load_uint(&lock->value); in ck_spinlock_cas_locked()
77 ck_spinlock_cas_lock(struct ck_spinlock_cas *lock) in ck_spinlock_cas_lock() argument
80 while (ck_pr_cas_uint(&lock->value, false, true) == false) { in ck_spinlock_cas_lock()
81 while (ck_pr_load_uint(&lock->value) == true) in ck_spinlock_cas_lock()
90 ck_spinlock_cas_lock_eb(struct ck_spinlock_cas *lock) in ck_spinlock_cas_lock_eb() argument
94 while (ck_pr_cas_uint(&lock->value, false, true) == false) in ck_spinlock_cas_lock_eb()
102 ck_spinlock_cas_unlock(struct ck_spinlock_cas *lock) in ck_spinlock_cas_unlock() argument
105 /* Set lock state to unlocked. */ in ck_spinlock_cas_unlock()
107 ck_pr_store_uint(&lock->value, false); in ck_spinlock_cas_unlock()