Searched refs:semnum (Results 1 - 4 of 4) sorted by relevance

/linux-4.4.14/ipc/
H A Dsem.c775 * @semnum: semaphore that was modified.
780 * be called with semnum = -1, as well as with the number of each modified
786 static int wake_const_ops(struct sem_array *sma, int semnum, wake_const_ops() argument
794 if (semnum == -1) wake_const_ops()
797 pending_list = &sma->sem_base[semnum].pending_const; wake_const_ops()
875 * @semnum: semaphore that was modified.
880 * be called with semnum = -1, as well as with the number of each modified
888 static int update_queue(struct sem_array *sma, int semnum, struct list_head *pt) update_queue() argument
895 if (semnum == -1) update_queue()
898 pending_list = &sma->sem_base[semnum].pending_alter; update_queue()
915 if (semnum != -1 && sma->sem_base[semnum].semval == 0) update_queue()
1014 * check_qop: Test if a queued operation sleeps on the semaphore semnum
1016 static int check_qop(struct sem_array *sma, int semnum, struct sem_queue *q, check_qop() argument
1032 if (sop->sem_num != semnum) check_qop()
1050 static int count_semcnt(struct sem_array *sma, ushort semnum, count_semcnt() argument
1060 l = &sma->sem_base[semnum].pending_const; count_semcnt()
1062 l = &sma->sem_base[semnum].pending_alter; count_semcnt()
1073 semcnt += check_qop(sma, semnum, q, count_zero);
1077 semcnt += check_qop(sma, semnum, q, count_zero);
1267 static int semctl_setval(struct ipc_namespace *ns, int semid, int semnum, semctl_setval() argument
1296 if (semnum < 0 || semnum >= sma->sem_nsems) { semctl_setval()
1321 curr = &sma->sem_base[semnum]; semctl_setval()
1325 un->semadj[semnum] = 0; semctl_setval()
1338 static int semctl_main(struct ipc_namespace *ns, int semid, int semnum, semctl_main() argument
1464 if (semnum < 0 || semnum >= nsems) semctl_main()
1472 curr = &sma->sem_base[semnum]; semctl_main()
1482 err = count_semcnt(sma, semnum, 0); semctl_main()
1485 err = count_semcnt(sma, semnum, 1); semctl_main()
1587 SYSCALL_DEFINE4(semctl, int, semid, int, semnum, int, cmd, unsigned long, arg) SYSCALL_DEFINE4()
1611 return semctl_main(ns, semid, semnum, cmd, p); SYSCALL_DEFINE4()
1613 return semctl_setval(ns, semid, semnum, arg); SYSCALL_DEFINE4()
H A Dcompat.c413 COMPAT_SYSCALL_DEFINE4(semctl, int, semid, int, semnum, int, cmd, int, arg) COMPAT_SYSCALL_DEFINE4()
415 return do_compat_semctl(semid, semnum, cmd, arg); COMPAT_SYSCALL_DEFINE4()
/linux-4.4.14/include/linux/
H A Dcompat.h320 asmlinkage long compat_sys_semctl(int semid, int semnum, int cmd, int arg);
H A Dsyscalls.h667 asmlinkage long sys_semctl(int semid, int semnum, int cmd, unsigned long arg);

Completed in 122 milliseconds