Lines Matching defs:sops

136 	struct sembuf		*sops;	 /* array of pending operations */
139 bool alter; /* does *sops alter the array? */
140 bool dupsop; /* sops on more than one sem_num */
297 curr = &sma->sems[q->sops[0].sem_num];
389 static inline int sem_lock(struct sem_array *sma, struct sembuf *sops,
411 idx = array_index_nospec(sops->sem_num, sma->sem_nsems);
428 return sops->sem_num;
449 return sops->sem_num;
652 struct sembuf *sops;
655 sops = q->sops;
659 for (sop = sops; sop < sops + nsops; sop++) {
687 while (sop >= sops) {
708 while (sop >= sops) {
724 struct sembuf *sops;
727 sops = q->sops;
740 for (sop = sops; sop < sops + nsops; sop++) {
766 for (sop = sops; sop < sops + nsops; sop++) {
885 * @sops: operations that were performed
893 static int do_smart_wakeup_zero(struct sem_array *sma, struct sembuf *sops,
901 if (sops) {
903 int num = sops[i].sem_num;
912 * No sops means modified semaphores not known.
986 do_smart_wakeup_zero(sma, q->sops, q->nsops, wake_q);
1000 * @sops: operations that modified the array, may be NULL
1005 static void set_semotime(struct sem_array *sma, struct sembuf *sops)
1007 if (sops == NULL) {
1010 sma->sems[sops[0].sem_num].sem_otime =
1018 * @sops: operations that were performed
1029 static void do_smart_update(struct sem_array *sma, struct sembuf *sops, int nsops,
1034 otime |= do_smart_wakeup_zero(sma, sops, nsops, wake_q);
1040 if (!sops) {
1042 * No sops, thus the modified semaphores are not
1058 if (sops[i].sem_op > 0) {
1060 sops[i].sem_num, wake_q);
1066 set_semotime(sma, sops);
1983 long __do_semtimedop(int semid, struct sembuf *sops,
2013 for (sop = sops; sop < sops + nsops; sop++) {
2066 error = security_sem_semop(&sma->sem_perm, sops, nsops, alter);
2073 locknum = sem_lock(sma, sops, nsops);
2094 queue.sops = sops;
2110 do_smart_update(sma, sops, nsops, 1, &wake_q);
2112 set_semotime(sma, sops);
2129 int idx = array_index_nospec(sops->sem_num, sma->sem_nsems);
2189 locknum = sem_lock(sma, sops, nsops);
2226 struct sembuf *sops = fast_sops;
2237 sops = kvmalloc_array(nsops, sizeof(*sops), GFP_KERNEL);
2238 if (sops == NULL)
2242 if (copy_from_user(sops, tsops, nsops * sizeof(*tsops))) {
2247 ret = __do_semtimedop(semid, sops, nsops, timeout, ns);
2250 if (sops != fast_sops)
2251 kvfree(sops);