Lines Matching refs: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 */
296 curr = &sma->sems[q->sops[0].sem_num];
386 static inline int sem_lock(struct sem_array *sma, struct sembuf *sops, int nsops)
407 idx = array_index_nospec(sops->sem_num, sma->sem_nsems);
424 return sops->sem_num;
445 return sops->sem_num;
655 struct sembuf *sops;
658 sops = q->sops;
662 for (sop = sops; sop < sops + nsops; sop++) {
694 while (sop >= sops) {
716 while (sop >= sops) {
733 struct sembuf *sops;
736 sops = q->sops;
750 for (sop = sops; sop < sops + nsops; sop++) {
780 for (sop = sops; sop < sops + nsops; sop++) {
904 * @sops: operations that were performed
912 static int do_smart_wakeup_zero(struct sem_array *sma, struct sembuf *sops, int nsops, struct wake_q_head *wake_q)
919 if (sops) {
921 int num = sops[i].sem_num;
930 * No sops means modified semaphores not known.
1006 do_smart_wakeup_zero(sma, q->sops, q->nsops, wake_q);
1021 * @sops: operations that modified the array, may be NULL
1026 static void set_semotime(struct sem_array *sma, struct sembuf *sops)
1028 if (sops == NULL) {
1031 sma->sems[sops[0].sem_num].sem_otime = ktime_get_real_seconds();
1038 * @sops: operations that were performed
1049 static void do_smart_update(struct sem_array *sma, struct sembuf *sops, int nsops, int otime,
1054 otime |= do_smart_wakeup_zero(sma, sops, nsops, wake_q);
1060 if (!sops) {
1062 * No sops, thus the modified semaphores are not
1079 if (sops[i].sem_op > 0) {
1080 otime |= update_queue(sma, sops[i].sem_num, wake_q);
1086 set_semotime(sma, sops);
2034 struct sembuf *sops = fast_sops, *sop;
2051 sops = kvmalloc_array(nsops, sizeof(*sops), GFP_KERNEL);
2052 if (sops == NULL) {
2057 if (copy_from_user(sops, tsops, nsops * sizeof(*tsops))) {
2071 for (sop = sops; sop < sops + nsops; sop++) {
2126 error = security_sem_semop(&sma->sem_perm, sops, nsops, alter);
2133 locknum = sem_lock(sma, sops, nsops);
2156 queue.sops = sops;
2172 do_smart_update(sma, sops, nsops, 1, &wake_q);
2174 set_semotime(sma, sops);
2193 int idx = array_index_nospec(sops->sem_num, sma->sem_nsems);
2255 locknum = sem_lock(sma, sops, nsops);
2288 if (sops != fast_sops) {
2289 kvfree(sops);