H A D | sem.c | 128 int semid; /* semaphore set identifier */ member in struct:sem_undo 145 #define sem_checkid(sma, semid) ipc_checkid(&sma->sem_perm, semid) 195 " key semid perms nsems uid gid cuid cgid otime ctime\n", sem_init() 1100 un->semid = -1; freeary() 1178 static int semctl_nolock(struct ipc_namespace *ns, int semid, semctl_nolock() argument 1228 sma = sem_obtain_object(ns, semid); semctl_nolock() 1235 sma = sem_obtain_object_check(ns, semid); semctl_nolock() 1267 static int semctl_setval(struct ipc_namespace *ns, int semid, int semnum, semctl_setval() argument 1290 sma = sem_obtain_object_check(ns, semid); semctl_setval() 1338 static int semctl_main(struct ipc_namespace *ns, int semid, int semnum, semctl_main() argument 1351 sma = sem_obtain_object_check(ns, semid); semctl_main() 1531 static int semctl_down(struct ipc_namespace *ns, int semid, semctl_down() argument 1547 ipcp = ipcctl_pre_down_nolock(ns, &sem_ids(ns), semid, cmd, semctl_down() 1587 SYSCALL_DEFINE4(semctl, int, semid, int, semnum, int, cmd, unsigned long, arg) SYSCALL_DEFINE4() 1593 if (semid < 0) SYSCALL_DEFINE4() 1604 return semctl_nolock(ns, semid, cmd, version, p); SYSCALL_DEFINE4() 1611 return semctl_main(ns, semid, semnum, cmd, p); SYSCALL_DEFINE4() 1613 return semctl_setval(ns, semid, semnum, arg); SYSCALL_DEFINE4() 1616 return semctl_down(ns, semid, cmd, version, p); SYSCALL_DEFINE4() 1652 static struct sem_undo *__lookup_undo(struct sem_undo_list *ulp, int semid) __lookup_undo() argument 1657 if (un->semid == semid) __lookup_undo() 1663 static struct sem_undo *lookup_undo(struct sem_undo_list *ulp, int semid) lookup_undo() argument 1669 un = __lookup_undo(ulp, semid); lookup_undo() 1680 * @semid: semaphore array id 1688 static struct sem_undo *find_alloc_undo(struct ipc_namespace *ns, int semid) find_alloc_undo() argument 1701 un = lookup_undo(ulp, semid); find_alloc_undo() 1708 sma = sem_obtain_object_check(ns, semid); find_alloc_undo() 1744 un = lookup_undo(ulp, semid); find_alloc_undo() 1752 new->semid = semid; find_alloc_undo() 1792 SYSCALL_DEFINE4(semtimedop, int, semid, struct sembuf __user *, tsops, SYSCALL_DEFINE4() 1808 if (nsops < 1 || semid < 0) SYSCALL_DEFINE4() 1848 un = find_alloc_undo(ns, semid); SYSCALL_DEFINE4() 1858 sma = sem_obtain_object_check(ns, semid); SYSCALL_DEFINE4() 1890 * semid identifiers are not unique - find_alloc_undo may have SYSCALL_DEFINE4() 1893 * This case can be detected checking un->semid. The existence of SYSCALL_DEFINE4() 1896 if (un && un->semid == -1) SYSCALL_DEFINE4() 1979 sma = sem_obtain_lock(ns, semid, sops, nsops, &locknum); SYSCALL_DEFINE4() 2027 SYSCALL_DEFINE3(semop, int, semid, struct sembuf __user *, tsops, SYSCALL_DEFINE3() 2030 return sys_semtimedop(semid, tsops, nsops, NULL); SYSCALL_DEFINE3() 2082 int semid, i; exit_sem() local 2099 semid = un->semid; exit_sem() 2103 if (semid == -1) { exit_sem() 2108 sma = sem_obtain_object_check(tsk->nsproxy->ipc_ns, semid); exit_sem() 2122 un = __lookup_undo(ulp, semid); exit_sem() 2125 * exactly the same semid. Nothing to do. exit_sem()
|