Displaying 2 results from an estimated 2 matches for "ticket_lock_lock_inc".
Did you mean:
ticket_lock_unlock_inc
2014 Jun 28
2
[RFC PATCH v2] Implement Batched (group) ticket lock
...E;
+}
+
+static void __ticket_lock_batch_spin(arch_spinlock_t *lock, __ticket_t ticket)
+{
+ if (static_key_false(¶virt_ticketlocks_enabled)) {
+ register struct __raw_tickets inc, new;
+
+ inc.head = ACCESS_ONCE(lock->tickets.head);
+ barrier();
+ for (;;) {
+ if (!(inc.head & TICKET_LOCK_LOCK_INC)) {
+ new.head = inc.head | TICKET_LOCK_LOCK_INC;
+ if (cmpxchg(&lock->tickets.head, inc.head,
+ new.head) == inc.head)
+ break;
+ }
+ cpu_relax();
+ inc.head = ACCESS_ONCE(lock->tickets.head);
+ }
+ } else {
+ add_smp(&lock->tickets.head, TICKET_LOCK_UNLOCK...
2014 Jun 28
2
[RFC PATCH v2] Implement Batched (group) ticket lock
...E;
+}
+
+static void __ticket_lock_batch_spin(arch_spinlock_t *lock, __ticket_t ticket)
+{
+ if (static_key_false(¶virt_ticketlocks_enabled)) {
+ register struct __raw_tickets inc, new;
+
+ inc.head = ACCESS_ONCE(lock->tickets.head);
+ barrier();
+ for (;;) {
+ if (!(inc.head & TICKET_LOCK_LOCK_INC)) {
+ new.head = inc.head | TICKET_LOCK_LOCK_INC;
+ if (cmpxchg(&lock->tickets.head, inc.head,
+ new.head) == inc.head)
+ break;
+ }
+ cpu_relax();
+ inc.head = ACCESS_ONCE(lock->tickets.head);
+ }
+ } else {
+ add_smp(&lock->tickets.head, TICKET_LOCK_UNLOCK...