Home
last modified time | relevance | path

Searched refs:sem_id (Results 1 – 24 of 24) sorted by relevance

/external/ltp/testcases/kernel/syscalls/ipc/semctl/
Dsemctl01.c23 static int sem_id = -1; variable
57 SAFE_SEMCTL(sem_id, 0, IPC_STAT, (union semun)&buf); in func_set()
89 if (semop(sem_id, &sops, 1) != -1) in child_cnt()
104 SAFE_SEMOP(sem_id, &sops, 1); in cnt_setup()
135 SAFE_SEMOP(sem_id, &sops, 1); in child_pid()
186 SAFE_SEMCTL(sem_id, 0, GETALL, (union semun)rarray); in func_sall()
199 int semv = SAFE_SEMCTL(sem_id, 4, GETVAL); in func_sval()
209 TST_EXP_FAIL(semop(sem_id, &sops, 1), EINVAL, "semaphore appears to be removed"); in func_rmid()
210 sem_id = -1; in func_rmid()
248 {&sem_id, 0, IPC_STAT, func_stat, SEMUN_CAST & buf, NULL},
[all …]
Dsemctl03.c20 static int sem_id = -1; variable
50 int *sem_id; member
56 {&sem_id, -1, &semds_ptr, EINVAL, "invalid IPC command"},
58 {&sem_id, GETALL, &bad_ptr, EFAULT, "invalid union arg"},
59 {&sem_id, IPC_SET, &bad_ptr, EFAULT, "invalid union arg"}
83 TST_EXP_FAIL(tv->semctl(*(tc->sem_id), 0, tc->ipc_cmd, *(tc->buf)), in verify_semctl()
96 sem_id = SAFE_SEMGET(semkey, PSEMS, IPC_CREAT | IPC_EXCL | SEM_RA); in setup()
103 if (sem_id != -1) in cleanup()
104 SAFE_SEMCTL(sem_id, 0, IPC_RMID); in cleanup()
Dsemctl02.c19 static int sem_id = -1; variable
28 TST_EXP_FAIL(semctl(sem_id, 0, IPC_STAT, un_arg), EACCES, in verify_semctl()
41 sem_id = SAFE_SEMGET(semkey, PSEMS, IPC_CREAT | IPC_EXCL); in setup()
46 if (sem_id != -1) in cleanup()
47 SAFE_SEMCTL(sem_id, 0, IPC_RMID); in cleanup()
Dsemctl05.c20 static int sem_id = -1; variable
44 TST_EXP_FAIL(semctl(sem_id, tc->count, tc->cmd, tc->t_arg), ERANGE, in verify_semctl()
54 sem_id = SAFE_SEMGET(semkey, PSEMS, IPC_CREAT | IPC_EXCL | SEM_RA); in setup()
59 if (sem_id != -1) in cleanup()
60 SAFE_SEMCTL(sem_id, 0, IPC_RMID); in cleanup()
Dsemctl04.c25 static int sem_id = -1; variable
44 TST_EXP_FAIL(semctl(sem_id, 0, tcases[i], arg), EPERM, in do_child()
69 sem_id = SAFE_SEMGET(semkey, PSEMS, IPC_CREAT | IPC_EXCL); in setup()
77 if (sem_id != -1) in cleanup()
78 SAFE_SEMCTL(sem_id, 0, IPC_RMID); in cleanup()
Dsemctl09.c49 static int sem_id = -1; variable
147 TEST(semctl(sem_id, 0, SEM_INFO, arg)); in verify_semctl()
195 sem_id = SAFE_SEMGET(IPC_PRIVATE, 2, IPC_CREAT | 0600); in setup()
197 TEST(do_semctl(sem_id, 0, SEM_STAT_ANY)); in setup()
214 if (sem_id >= 0) in cleanup()
215 SAFE_SEMCTL(sem_id, 0, IPC_RMID); in cleanup()
/external/ltp/testcases/kernel/syscalls/ipc/semop/
Dsemop01.c18 static int sem_id = -1; variable
40 TEST(call_semop(tv, sem_id, sops, NSEMS, tst_ts_get(tc[n].to))); in run()
46 if (semctl(sem_id, 0, GETALL, get_arr) == -1) in run()
47 tst_brk(TBROK | TERRNO, "semctl(%i, 0, GETALL, ...)", sem_id); in run()
61 if (semctl(sem_id, i, SETVAL, arr) == -1) in run()
62 tst_brk(TBROK | TERRNO, "semctl(%i, %i, SETVAL, ...)", sem_id, i); in run()
80 sem_id = semget(semkey, PSEMS, IPC_CREAT | IPC_EXCL | SEM_RA); in setup()
81 if (sem_id == -1) in setup()
93 if (sem_id != -1) { in cleanup()
94 if (semctl(sem_id, 0, IPC_RMID) == -1) in cleanup()
Dsemop03.c20 static int sem_id = -1; variable
45 TEST(call_semop(tv, sem_id, &s_buf, 1, tst_ts_get(&timeout))); in do_child()
79 sem_id = semget(semkey, PSEMS, IPC_CREAT | IPC_EXCL | SEM_RA); in setup()
80 if (sem_id == -1) in setup()
86 if (sem_id != -1) { in cleanup()
87 if (semctl(sem_id, 0, IPC_RMID) == -1) in cleanup()
96 if (semctl(sem_id, tc[i].num, SETVAL, tc[i].semunptr) == -1) in run()
125 sem_id = semget(semkey, PSEMS, IPC_CREAT | IPC_EXCL | SEM_RA); in run()
126 if (sem_id == -1) in run()
/external/ltp/testcases/kernel/ipc/semaphore/
Dsem02.c70 int sem_id; variable
82 sem_id = semget(KEY, 1, 0666 | IPC_CREAT); in main()
83 if (sem_id < 0) { in main()
89 semctl(sem_id, 0, SETVAL, semunion); in main()
109 semctl(sem_id, 0, IPC_RMID, semunion); in main()
132 semop(sem_id, &Psembuf, 1); in waiter()
148 semop(sem_id, &Vsembuf, 1); in poster()
/external/ltp/testcases/kernel/syscalls/sendmsg/
Dsendmsg02.c51 static int sem_id; variable
95 semval = semctl(sem_id, 0, GETVAL); in client()
117 semval = semctl(sem_id, 0, GETVAL); in server()
134 if (semctl(sem_id, 0, SETVAL, u) == -1) in reproduce()
174 if (semctl(sem_id, 0, SETVAL, u) == -1) { in reproduce()
218 sem_id = semget(IPC_PRIVATE, 1, IPC_CREAT | S_IRWXU); in setup()
219 if (sem_id == -1) in setup()
227 semctl(sem_id, 0, IPC_RMID); in cleanup()
/external/python/cpython2/Python/
Dthread_atheos.h22 sem_id sem;
158 sem_id sema; in PyThread_allocate_lock()
208 if (delete_semaphore((sem_id) lock) < 0) { in PyThread_free_lock()
230 retval = lock_semaphore((sem_id) lock); in PyThread_acquire_lock()
232 retval = lock_semaphore_x((sem_id) lock, 1, 0, 0); in PyThread_acquire_lock()
254 if (unlock_semaphore((sem_id) lock) < 0) { in PyThread_release_lock()
Dthread_beos.h10 sem_id _sem;
/external/ltp/testcases/kernel/ipc/pipeio/
Dpipeio.c124 static int sem_id; variable
169 if (semctl(sem_id, 1, GETVAL) == 0) in main()
457 sem_id = semget(IPC_PRIVATE, 2, IPC_CREAT | S_IRWXU); in setup()
458 if (sem_id == -1) { in setup()
463 if (semctl(sem_id, 0, SETVAL, u) == -1) { in setup()
468 if (semctl(sem_id, 1, SETVAL, u) == -1) { in setup()
490 semctl(sem_id, 0, IPC_RMID); in cleanup()
528 if (semop(sem_id, &sem_op, 1) == -1) { in do_child()
587 if (semop(sem_id, &sem_op, 1) == -1) in do_child()
637 if (semop(sem_id, &sem_op, 1) == -1) { in do_parent()
[all …]
/external/ltp/libs/libltpipc/
Dlibipc.c123 void rm_sema(int sem_id) in rm_sema() argument
125 if (sem_id == -1) { /* no semaphore to remove */ in rm_sema()
129 if (semctl(sem_id, 0, IPC_RMID) == -1) { in rm_sema()
132 tst_resm(TINFO, "id = %d", sem_id); in rm_sema()
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_close/
Dcln.sh5 for sem_id in `ipcs -s | awk '{print $2}'` ; do
6 ipcrm sem $sem_id > /dev/null 2>&1
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_getvalue/
Dcln.sh6 for sem_id in `ipcs -s | awk '{print $2}'` ; do
7 ipcrm sem $sem_id > /dev/null 2>&1
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_unlink/
Dcln.sh6 for sem_id in `ipcs -s | awk '{print $2}'` ; do
7 ipcrm sem $sem_id > /dev/null 2>&1
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_destroy/
Dcln.sh6 for sem_id in `ipcs -s | awk '{print $2}'` ; do
7 ipcrm sem $sem_id > /dev/null 2>&1
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_post/
Dcln.sh6 for sem_id in `ipcs -s | awk '{print $2}'` ; do
7 ipcrm sem $sem_id > /dev/null 2>&1
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_wait/
Dcln.sh6 for sem_id in `ipcs -s | awk '{print $2}'` ; do
7 ipcrm sem $sem_id > /dev/null 2>&1
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sem_open/
Dcln.sh6 for sem_id in `ipcs -s | awk '{print $2}'` ; do
7 ipcrm sem $sem_id > /dev/null 2>&1
/external/rust/crates/libc/src/unix/haiku/
Dnative.rs37 pub type sem_id = i32; typedef
248 pub sem: sem_id,
266 pub sem: sem_id,
924 pub fn create_sem(count: i32, name: *const ::c_char) -> sem_id; in create_sem() argument
925 pub fn delete_sem(id: sem_id) -> status_t; in delete_sem()
926 pub fn acquire_sem(id: sem_id) -> status_t; in acquire_sem()
927 pub fn acquire_sem_etc(id: sem_id, count: i32, flags: u32, timeout: bigtime_t) -> status_t; in acquire_sem_etc() argument
928 pub fn release_sem(id: sem_id) -> status_t; in release_sem()
929 pub fn release_sem_etc(id: sem_id, count: i32, flags: u32) -> status_t; in release_sem_etc() argument
930 pub fn switch_sem(semToBeReleased: sem_id, id: sem_id) -> status_t; in switch_sem() argument
[all …]
/external/ltp/include/
Dipcsem.h50 void rm_sema(int sem_id);
/external/libusb/libusb/os/
Dhaiku_usb.h84 sem_id fTransfersSem;