Lines Matching defs:nsops
138 int nsops; /* number of operations */
386 static inline int sem_lock(struct sem_array *sma, struct sembuf *sops, int nsops)
391 if (nsops != 1) {
651 int result, sem_op, nsops;
659 nsops = q->nsops;
662 for (sop = sops; sop < sops + nsops; sop++) {
730 int result, sem_op, nsops;
737 nsops = q->nsops;
750 for (sop = sops; sop < sops + nsops; sop++) {
780 for (sop = sops; sop < sops + nsops; sop++) {
816 if (q->nsops > 1) {
839 if (q->nsops > 1) {
905 * @nsops: number of operations
912 static int do_smart_wakeup_zero(struct sem_array *sma, struct sembuf *sops, int nsops, struct wake_q_head *wake_q)
920 for (i = 0; i < nsops; i++) {
1006 do_smart_wakeup_zero(sma, q->sops, q->nsops, wake_q);
1039 * @nsops: number of operations
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);
1078 for (i = 0; i < nsops; i++) {
2029 static long do_semtimedop(int semid, struct sembuf __user *tsops, unsigned nsops, const struct timespec64 *timeout)
2044 if (nsops < 1 || semid < 0) {
2047 if (nsops > ns->sc_semopm) {
2050 if (nsops > SEMOPM_FAST) {
2051 sops = kvmalloc_array(nsops, sizeof(*sops), GFP_KERNEL);
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);
2137 * If nsops == 1 and there is no contention for sem_perm.lock, then
2157 queue.nsops = nsops;
2172 do_smart_update(sma, sops, nsops, 1, &wake_q);
2191 if (nsops == 1) {
2255 locknum = sem_lock(sma, sops, nsops);
2294 long ksys_semtimedop(int semid, struct sembuf __user *tsops, unsigned int nsops,
2302 return do_semtimedop(semid, tsops, nsops, &ts);
2304 return do_semtimedop(semid, tsops, nsops, NULL);
2307 SYSCALL_DEFINE4(semtimedop, int, semid, struct sembuf __user *, tsops, unsigned int, nsops,
2310 return ksys_semtimedop(semid, tsops, nsops, timeout);
2314 long compat_ksys_semtimedop(int semid, struct sembuf __user *tsems, unsigned int nsops,
2322 return do_semtimedop(semid, tsems, nsops, &ts);
2324 return do_semtimedop(semid, tsems, nsops, NULL);
2327 SYSCALL_DEFINE4(semtimedop_time32, int, semid, struct sembuf __user *, tsems, unsigned int, nsops,
2330 return compat_ksys_semtimedop(semid, tsems, nsops, timeout);
2334 SYSCALL_DEFINE3(semop, int, semid, struct sembuf __user *, tsops, unsigned, nsops)
2336 return do_semtimedop(semid, tsops, nsops, NULL);