Lines Matching refs:sops

136 	struct sembuf		*sops;	 /* array of pending operations */  member
297 curr = &sma->sems[q->sops[0].sem_num]; in unmerge_queues()
389 static inline int sem_lock(struct sem_array *sma, struct sembuf *sops, in sem_lock() argument
411 idx = array_index_nospec(sops->sem_num, sma->sem_nsems); in sem_lock()
428 return sops->sem_num; in sem_lock()
449 return sops->sem_num; in sem_lock()
652 struct sembuf *sops; in perform_atomic_semop_slow() local
655 sops = q->sops; in perform_atomic_semop_slow()
659 for (sop = sops; sop < sops + nsops; sop++) { in perform_atomic_semop_slow()
687 while (sop >= sops) { in perform_atomic_semop_slow()
708 while (sop >= sops) { in perform_atomic_semop_slow()
724 struct sembuf *sops; in perform_atomic_semop() local
727 sops = q->sops; in perform_atomic_semop()
740 for (sop = sops; sop < sops + nsops; sop++) { in perform_atomic_semop()
766 for (sop = sops; sop < sops + nsops; sop++) { in perform_atomic_semop()
893 static int do_smart_wakeup_zero(struct sem_array *sma, struct sembuf *sops, in do_smart_wakeup_zero() argument
901 if (sops) { in do_smart_wakeup_zero()
903 int num = sops[i].sem_num; in do_smart_wakeup_zero()
986 do_smart_wakeup_zero(sma, q->sops, q->nsops, wake_q); in update_queue()
1005 static void set_semotime(struct sem_array *sma, struct sembuf *sops) in set_semotime() argument
1007 if (sops == NULL) { in set_semotime()
1010 sma->sems[sops[0].sem_num].sem_otime = in set_semotime()
1029 static void do_smart_update(struct sem_array *sma, struct sembuf *sops, int nsops, in do_smart_update() argument
1034 otime |= do_smart_wakeup_zero(sma, sops, nsops, wake_q); in do_smart_update()
1040 if (!sops) { in do_smart_update()
1058 if (sops[i].sem_op > 0) { in do_smart_update()
1060 sops[i].sem_num, wake_q); in do_smart_update()
1066 set_semotime(sma, sops); in do_smart_update()
1983 long __do_semtimedop(int semid, struct sembuf *sops, in __do_semtimedop() argument
2013 for (sop = sops; sop < sops + nsops; sop++) { in __do_semtimedop()
2066 error = security_sem_semop(&sma->sem_perm, sops, nsops, alter); in __do_semtimedop()
2073 locknum = sem_lock(sma, sops, nsops); in __do_semtimedop()
2094 queue.sops = sops; in __do_semtimedop()
2110 do_smart_update(sma, sops, nsops, 1, &wake_q); in __do_semtimedop()
2112 set_semotime(sma, sops); in __do_semtimedop()
2129 int idx = array_index_nospec(sops->sem_num, sma->sem_nsems); in __do_semtimedop()
2189 locknum = sem_lock(sma, sops, nsops); in __do_semtimedop()
2226 struct sembuf *sops = fast_sops; in do_semtimedop() local
2237 sops = kvmalloc_array(nsops, sizeof(*sops), GFP_KERNEL); in do_semtimedop()
2238 if (sops == NULL) in do_semtimedop()
2242 if (copy_from_user(sops, tsops, nsops * sizeof(*tsops))) { in do_semtimedop()
2247 ret = __do_semtimedop(semid, sops, nsops, timeout, ns); in do_semtimedop()
2250 if (sops != fast_sops) in do_semtimedop()
2251 kvfree(sops); in do_semtimedop()