Home
last modified time | relevance | path

Searched refs:semid (Results 1 – 23 of 23) sorted by relevance

/external/valgrind/none/tests/
Dsem.c13 int semid; in main() local
19 if ((semid = semget(IPC_PRIVATE, 1, 0600)) < 0) in main()
29 if (semop(semid, &sop, 1) < 0) in main()
32 semctl(semid, 0, IPC_RMID); in main()
36 if (semctl(semid, 0, GETVAL) != 1) in main()
39 semctl(semid, 0, IPC_RMID); in main()
43 if (semctl(semid, 0, GETPID) != getpid()) in main()
46 semctl(semid, 0, IPC_RMID); in main()
61 if (semtimedop(semid, &sop, 1, &ts) < 0 && errno != EAGAIN) in main()
64 semctl(semid, 0, IPC_RMID); in main()
[all …]
/external/ltp/testcases/kernel/ipc/ipc_stress/
Dsemaphore_test_03.c234 int semid; /* Unique semaphore id */ in test_commands() local
249 if ((semid = semget(IPC_PRIVATE, nsems, IPC_CREAT | mode)) < 0) in test_commands()
258 semid); in test_commands()
265 if (semctl(semid, 0, IPC_SET, arg) < 0) in test_commands()
273 if (semctl(semid, 0, IPC_STAT, arg) < 0) in test_commands()
294 if (semctl(semid, 0, SETALL, arg) < 0) in test_commands()
322 if (semop(semid, semoparray, nsems) < 0) in test_commands()
328 if ((val = semctl(semid, i, GETVAL, arg)) < 0) in test_commands()
345 if (semop(semid, semoparray, nsems) < 0) in test_commands()
351 if ((val = semctl(semid, i, GETVAL, arg)) < 0) in test_commands()
[all …]
Dsemaphore_test_02.c210 int semid; /* Unique semaphore id */ in test_commands() local
225 if ((semid = semget(IPC_PRIVATE, nsems, IPC_CREAT | 0666)) < 0) in test_commands()
244 if (semctl(semid, 0, IPC_SET, semunptr) < 0) in test_commands()
255 if (semctl(semid, 0, IPC_STAT, semunptr) < 0) in test_commands()
278 if (semctl(semid, i, SETVAL, arg) < 0) in test_commands()
291 if ((val = semctl(semid, i, GETVAL, arg)) < 0) in test_commands()
304 if ((val = semop(semid, &sops, 1)) < 0) in test_commands()
307 if ((val = semop(semid, &sops, 1)) < 0) in test_commands()
317 if ((val = semctl(semid, i, GETPID, arg)) < 0) in test_commands()
335 if ((val = semctl(semid, i, GETNCNT, arg)) < 0) in test_commands()
[all …]
Dsemaphore_test_01.c106 int semid; /* Unique semaphore id */ in main() local
132 if ((semid = semget(IPC_PRIVATE, nsems, IPC_CREAT | 0666)) < 0) in main()
135 if (semctl(semid, nsems, IPC_SET, exp_semdatap) < 0) in main()
138 if (semctl(semid, nsems, IPC_STAT, act_semdatap) < 0) in main()
161 printf("%d\n", semid); in main()
Dshmem_test_03.c141 int semid; /* semaphore id */ variable
365 if ((semid = semget(IPC_PRIVATE, nsems, IPC_CREAT | 0666)) < 0) in create_semaphores()
369 if (semctl(semid, WRITE, SETVAL, arg) < 0) in create_semaphores()
371 if (semctl(semid, READ_COUNT, SETVAL, arg) < 0) in create_semaphores()
391 if (semctl(semid, nsems, IPC_RMID, arg) < 0) in delete_semaphores()
410 if (semop(semid, &buf, 1) < 0) in lock_resource()
429 if (semop(semid, &buf, 1) < 0) in unlock_resource()
/external/ltp/testcases/kernel/ipc/semaphore/
Dsem01.c50 int semup(int semid) in semup() argument
56 if (semop(semid, &semops, 1) == -1) { in semup()
64 int semdown(int semid) in semdown() argument
70 if (semop(semid, &semops, 1) == -1) { in semdown()
87 void mainloop(int semid) in mainloop() argument
91 if (semdown(semid)) { in mainloop()
97 if (semup(semid)) { in mainloop()
107 int semid, opt; in main() local
129 if ((semid = semget((key_t) 9142, 1, 0666 | IPC_CREAT)) < 0) { in main()
134 if (semctl(semid, 0, SETVAL, semunion) == -1) { in main()
[all …]
/external/ltp/testcases/kernel/syscalls/ipc/semctl/
Dsemctl07.c58 int semid = -1, nsems; variable
70 if ((status = semctl(semid, 0, IPC_STAT, arg)) == -1) { in main()
72 semctl(semid, 1, IPC_RMID, arg); in main()
105 if ((status = semctl(semid, 0, GETVAL, arg)) == -1) { in main()
110 if ((status = semctl(semid, 0, SETVAL, arg)) == -1) { in main()
114 if ((status = semctl(semid, 0, GETVAL, arg)) == -1) { in main()
122 if ((status = semctl(semid, 0, GETPID, arg)) == -1) { in main()
131 if ((status = semctl(semid, 0, GETNCNT, arg)) == -1) { in main()
139 if ((status = semctl(semid, 0, GETZCNT, arg)) == -1) { in main()
166 if ((semid = semget(key, nsems, SEM_RA | IPC_CREAT)) == -1) { in setup()
[all …]
Dsemctl01.c101 int *semid; member
181 TEST(semctl(*(TC[i].semid), TC[i].semnum, TC[i].cmd, in main()
/external/ltp/testcases/kernel/mem/mtest07/
Dmallocstress.c92 int semid; variable
260 if (semop(semid, sop, 1) == -1) { in alloc_mem()
339 semid = semget(IPC_PRIVATE, 1, IPC_CREAT | 0666); in main()
340 if (semid < 0) { in main()
347 if (semop(semid, sop, 1) == -1) { in main()
371 if (semop(semid, sop, 1) == -1) { in main()
398 if (semctl(semid, 0, IPC_RMID) == -1) { in main()
/external/ltp/testcases/kernel/syscalls/cma/
Dprocess_vm_readv02.c41 static int semid; variable
89 safe_semop(semid, 0, 1); in main()
118 safe_semop(semid, 0, -1); in child_alloc()
159 semid = init_sem(1); in setup()
166 clean_sem(semid); in cleanup()
Dprocess_vm_writev02.c50 static int semid; variable
101 safe_semop(semid, 0, 1); in main()
131 safe_semop(semid, 0, -1); in child_init_and_verify()
194 semid = init_sem(1); in setup()
201 clean_sem(semid); in cleanup()
Dprocess_vm_readv03.c53 static int semid; variable
107 safe_semop(semid, 0, 1); in main()
162 safe_semop(semid, 0, -1); in child_alloc()
260 semid = init_sem(1); in setup()
268 clean_sem(semid); in cleanup()
/external/toybox/toys/pending/
Dipcs.c254 int max_nr, i,semid; in sem_array() local
307 if ((semid = semctl(i, 0, SEM_STAT, u)) < 0) continue; in sem_array()
310 if (pw) printf("%-8d %-10.10s", semid, pw->pw_name); in sem_array()
311 else printf("%-8d %-10d", semid, buf.sem_perm.uid); in sem_array()
318 printf("%-10d %-10o", semid, buf.sem_perm.mode & 0777); in sem_array()
329 if (pw) printf("%-10d %-10.9s", semid, pw->pw_name); in sem_array()
330 else printf("%-10d %-9d", semid, buf.sem_perm.uid); in sem_array()
/external/ltp/testcases/kernel/syscalls/ipc/semop/
Dsemop02.c53 int *semid; member
140 TEST(semop(*(TC[i].semid), TC[i].t_sbuf, TC[i].t_ops)); in semop_verify()
/external/valgrind/coregrind/m_syswrap/
Dsyswrap-tilegx-linux.c929 int, semid, struct sembuf *, sops, unsigned, nsoops); in PRE()
938 int, semid, struct sembuf *, sops, unsigned, nsoops, in PRE()
950 int, semid, int, semnum, int, cmd, struct seminfo *, arg); in PRE()
957 int, semid, int, semnum, int, cmd, struct semid_ds *, arg); in PRE()
963 int, semid, int, semnum, int, cmd, unsigned short *, arg); in PRE()
968 int, semid, int, semnum, int, cmd); in PRE()
Dsyswrap-solaris.c2857 int, semid, int, semnum, int, cmd, in PRE()
2864 int, semid, int, semnum, int, cmd, in PRE()
2871 int, semid, int, semnum, int, cmd, in PRE()
2878 int, semid, int, semnum, int, cmd, in PRE()
2884 int, semid, int, cmd); in PRE()
2890 int, semid, int, cmd, ushort_t *, arg); in PRE()
2896 int, semid, int, cmd, ushort_t *, arg); in PRE()
2902 int, semid, int, semnum, int, cmd); in PRE()
2908 int, semid, int, semnum, int, cmd, in PRE()
2915 int, semid, int, semnum, int, cmd); in PRE()
[all …]
Dsyswrap-generic.c1770 UInt get_sem_count( Int semid ) in get_sem_count() argument
1784 res = VG_(do_syscall4)(__NR_semctl, semid, 0, VKI_IPC_STAT, *(UWord *)&arg); in get_sem_count()
1786 res = VG_(do_syscall5)(__NR_semsys, VKI_SEMCTL, semid, 0, VKI_IPC_STAT, in get_sem_count()
1789 res = VG_(do_syscall5)(__NR_ipc, 3 /* IPCOP_semctl */, semid, 0, in get_sem_count()
Dsyswrap-darwin.c1819 int, semid, struct sembuf *, sops, vki_size_t, nsoops); in PRE()
1830 int, semid, int, semnum, int, cmd, struct semid_ds *, arg); in PRE()
1836 int, semid, int, semnum, int, cmd, unsigned short *, arg); in PRE()
1841 int, semid, int, semnum, int, cmd, int, arg); in PRE()
1846 int, semid, int, semnum, int, cmd); in PRE()
Dsyswrap-linux.c3776 int, semid, struct sembuf *, sops, unsigned, nsoops); in PRE()
3787 int, semid, int, semnum, int, cmd, struct seminfo *, arg); in PRE()
3794 int, semid, int, semnum, int, cmd, struct semid_ds *, arg); in PRE()
3800 int, semid, int, semnum, int, cmd, unsigned short *, arg); in PRE()
3805 int, semid, int, semnum, int, cmd); in PRE()
3829 int, semid, struct sembuf *, sops, unsigned, nsoops, in PRE()
/external/compiler-rt/include/sanitizer/
Dlinux_syscall_hooks.h1312 #define __sanitizer_syscall_pre_semop(semid, sops, nsops) \ argument
1313 __sanitizer_syscall_pre_impl_semop((long)(semid), (long)(sops), (long)(nsops))
1314 #define __sanitizer_syscall_post_semop(res, semid, sops, nsops) \ argument
1315 __sanitizer_syscall_post_impl_semop(res, (long)(semid), (long)(sops), \
1317 #define __sanitizer_syscall_pre_semctl(semid, semnum, cmd, arg) \ argument
1318 __sanitizer_syscall_pre_impl_semctl((long)(semid), (long)(semnum), \
1320 #define __sanitizer_syscall_post_semctl(res, semid, semnum, cmd, arg) \ argument
1321 __sanitizer_syscall_post_impl_semctl(res, (long)(semid), (long)(semnum), \
1323 #define __sanitizer_syscall_pre_semtimedop(semid, sops, nsops, timeout) \ argument
1324 __sanitizer_syscall_pre_impl_semtimedop((long)(semid), (long)(sops), \
[all …]
/external/valgrind/memcheck/tests/solaris/
Dscalar.stderr.exp666 Syscall param semsys_semctl_stat(semid) contains uninitialised byte(s)
688 Syscall param semsys_semctl_set(semid) contains uninitialised byte(s)
710 Syscall param semsys_semctl_stat64(semid) contains uninitialised byte(s)
732 Syscall param semsys_semctl_set64(semid) contains uninitialised byte(s)
754 Syscall param semsys_semctl_rmid(semid) contains uninitialised byte(s)
766 Syscall param semsys_semctl_getall(semid) contains uninitialised byte(s)
781 Syscall param semsys_semctl_setall(semid) contains uninitialised byte(s)
796 Syscall param semsys_semctl_getval(semid) contains uninitialised byte(s)
811 Syscall param semsys_semctl_setval(semid) contains uninitialised byte(s)
829 Syscall param semsys_semctl_getpid(semid) contains uninitialised byte(s)
[all …]
/external/compiler-rt/lib/sanitizer_common/
Dsanitizer_common_syscalls.inc2102 PRE_SYSCALL(semop)(long semid, void *sops, long nsops) {}
2104 POST_SYSCALL(semop)(long res, long semid, void *sops, long nsops) {}
2106 PRE_SYSCALL(semctl)(long semid, long semnum, long cmd, void *arg) {}
2108 POST_SYSCALL(semctl)(long res, long semid, long semnum, long cmd, void *arg) {}
2110 PRE_SYSCALL(semtimedop)(long semid, void *sops, long nsops,
2115 POST_SYSCALL(semtimedop)(long res, long semid, void *sops, long nsops,
/external/strace/
DChangeLog6278 for semid argument.
6280 (SYS_FUNC(semctl)): Likewise, for semid and semnum arguments.
28039 int semtimedop(semid, *sops, nsops, *timeout);
28043 semid, (int) nsops, 0, CHECK_N (sops, nsops), timeout
28048 semid, (int) nsops, timeout, sops