Lines Matching refs:waiter
368 rwsem_add_waiter(struct rw_semaphore *sem, struct rwsem_waiter *waiter) in rwsem_add_waiter() argument
371 list_add_tail(&waiter->list, &sem->wait_list); in rwsem_add_waiter()
384 rwsem_del_waiter(struct rw_semaphore *sem, struct rwsem_waiter *waiter) in rwsem_del_waiter() argument
387 list_del(&waiter->list); in rwsem_del_waiter()
413 struct rwsem_waiter *waiter, *tmp; in rwsem_mark_wake() local
423 waiter = rwsem_first_waiter(sem); in rwsem_mark_wake()
425 if (waiter->type == RWSEM_WAITING_FOR_WRITE) { in rwsem_mark_wake()
434 wake_q_add(wake_q, waiter->task); in rwsem_mark_wake()
463 if (time_after(jiffies, waiter->timeout)) { in rwsem_mark_wake()
468 waiter->handoff_set = true; in rwsem_mark_wake()
480 owner = waiter->task; in rwsem_mark_wake()
508 list_for_each_entry_safe(waiter, tmp, &sem->wait_list, list) { in rwsem_mark_wake()
509 if (waiter->type == RWSEM_WAITING_FOR_WRITE) in rwsem_mark_wake()
513 list_move_tail(&waiter->list, &wlist); in rwsem_mark_wake()
547 list_for_each_entry_safe(waiter, tmp, &wlist, list) { in rwsem_mark_wake()
550 tsk = waiter->task; in rwsem_mark_wake()
559 smp_store_release(&waiter->task, NULL); in rwsem_mark_wake()
575 rwsem_del_wake_waiter(struct rw_semaphore *sem, struct rwsem_waiter *waiter, in rwsem_del_wake_waiter() argument
579 bool first = rwsem_first_waiter(sem) == waiter; in rwsem_del_wake_waiter()
588 if (rwsem_del_waiter(sem, waiter) && first) in rwsem_del_wake_waiter()
603 struct rwsem_waiter *waiter) in rwsem_try_write_lock() argument
620 if (first->handoff_set && (waiter != first)) in rwsem_try_write_lock()
632 if (has_handoff || (!rt_or_dl_task(waiter->task) && in rwsem_try_write_lock()
633 !time_after(jiffies, waiter->timeout))) in rwsem_try_write_lock()
661 list_del(&waiter->list); in rwsem_try_write_lock()
998 struct rwsem_waiter waiter; in rwsem_down_read_slowpath() local
1033 waiter.task = current; in rwsem_down_read_slowpath()
1034 waiter.type = RWSEM_WAITING_FOR_READ; in rwsem_down_read_slowpath()
1035 waiter.timeout = jiffies + RWSEM_WAIT_TIMEOUT; in rwsem_down_read_slowpath()
1036 waiter.handoff_set = false; in rwsem_down_read_slowpath()
1056 rwsem_add_waiter(sem, &waiter); in rwsem_down_read_slowpath()
1072 if (!smp_load_acquire(&waiter.task)) { in rwsem_down_read_slowpath()
1078 if (waiter.task) in rwsem_down_read_slowpath()
1094 rwsem_del_wake_waiter(sem, &waiter, &wake_q); in rwsem_down_read_slowpath()
1107 struct rwsem_waiter waiter; in rwsem_down_write_slowpath() local
1120 waiter.task = current; in rwsem_down_write_slowpath()
1121 waiter.type = RWSEM_WAITING_FOR_WRITE; in rwsem_down_write_slowpath()
1122 waiter.timeout = jiffies + RWSEM_WAIT_TIMEOUT; in rwsem_down_write_slowpath()
1123 waiter.handoff_set = false; in rwsem_down_write_slowpath()
1126 rwsem_add_waiter(sem, &waiter); in rwsem_down_write_slowpath()
1129 if (rwsem_first_waiter(sem) != &waiter) { in rwsem_down_write_slowpath()
1150 if (rwsem_try_write_lock(sem, &waiter)) { in rwsem_down_write_slowpath()
1168 if (waiter.handoff_set) { in rwsem_down_write_slowpath()
1191 rwsem_del_wake_waiter(sem, &waiter, &wake_q); in rwsem_down_write_slowpath()