Lines Matching +full:acquisition +full:- +full:time

2  * Copyright 2013-2015 Olivier Houchard
3 * Copyright 2010-2015 Samy Al Bahra.
52 unowned->previous = NULL; in ck_spinlock_hclh_init()
53 unowned->wait = false; in ck_spinlock_hclh_init()
54 unowned->splice = false; in ck_spinlock_hclh_init()
55 unowned->cluster_id = cluster_id; in ck_spinlock_hclh_init()
68 r = ck_pr_load_uint(&head->wait); in ck_spinlock_hclh_locked()
81 thread->wait = true; in ck_spinlock_hclh_lock()
82 thread->splice = false; in ck_spinlock_hclh_lock()
83 thread->cluster_id = (*local_queue)->cluster_id; in ck_spinlock_hclh_lock()
84 /* Make sure previous->previous doesn't appear to be NULL */ in ck_spinlock_hclh_lock()
85 thread->previous = *local_queue; in ck_spinlock_hclh_lock()
92 thread->previous = previous; in ck_spinlock_hclh_lock()
96 if (previous->previous != NULL) { in ck_spinlock_hclh_lock()
97 while (ck_pr_load_uint(&previous->wait) == true && in ck_spinlock_hclh_lock()
98 ck_pr_load_int(&previous->cluster_id) == thread->cluster_id && in ck_spinlock_hclh_lock()
99 ck_pr_load_uint(&previous->splice) == false) in ck_spinlock_hclh_lock()
103 if (ck_pr_load_int(&previous->cluster_id) == thread->cluster_id && in ck_spinlock_hclh_lock()
104 ck_pr_load_uint(&previous->splice) == false) in ck_spinlock_hclh_lock()
112 ck_pr_store_uint(&local_tail->splice, true); in ck_spinlock_hclh_lock()
115 while (ck_pr_load_uint(&previous->wait) == true) in ck_spinlock_hclh_lock()
130 * acquisition. If the caller is pre-empted then the predecessor field in ck_spinlock_hclh_unlock()
134 previous = thread[0]->previous; in ck_spinlock_hclh_unlock()
138 ck_pr_store_uint(&(*thread)->wait, false); in ck_spinlock_hclh_unlock()
143 * all the time in the world to successfully read updated wait flag. in ck_spinlock_hclh_unlock()