/third_party/ltp/testcases/kernel/ipc/semaphore/ |
D | sem01.c | 49 int semup(int semid) in semup() argument 55 if (semop(semid, &semops, 1) == -1) { in semup() 63 int semdown(int semid) in semdown() argument 69 if (semop(semid, &semops, 1) == -1) { in semdown() 86 void mainloop(int semid) in mainloop() argument 90 if (semdown(semid)) { in mainloop() 96 if (semup(semid)) { in mainloop() 106 int semid, opt; in main() local 128 if ((semid = semget((key_t) 9142, 1, 0666 | IPC_CREAT)) < 0) { in main() 133 if (semctl(semid, 0, SETVAL, semunion) == -1) { in main() [all …]
|
/third_party/musl/libc-test/src/functional/ |
D | ipc_sem.c | 31 int semid, semval, sempid, semncnt, semzcnt; in inc() local 44 T(semid = semget(k, 1, IPC_CREAT|0666)); in inc() 45 T(semctl(semid, 0, IPC_RMID)); in inc() 46 T(semid = semget(k, 1, IPC_CREAT|IPC_EXCL|0666)); in inc() 58 T(semctl(semid, 0, IPC_STAT, arg)); in inc() 75 T(semop(semid, &sops, 1)); in inc() 76 T(semval = semctl(semid, 0, GETVAL)); in inc() 78 T(sempid = semctl(semid, 0, GETPID)); in inc() 80 T(semncnt = semctl(semid, 0, GETNCNT)); in inc() 82 T(semzcnt = semctl(semid, 0, GETZCNT)); in inc() [all …]
|
/third_party/ltp/testcases/kernel/syscalls/ipc/semctl/ |
D | semctl07.c | 28 static int semid = -1; variable 38 TST_EXP_PASS(semctl(semid, 0, IPC_STAT, arg)); in verify_semctl() 75 if ((status = semctl(semid, 0, GETVAL)) < 0) in verify_semctl() 82 if ((status = semctl(semid, 0, SETVAL, arg)) < 0) in verify_semctl() 87 if ((status = semctl(semid, 0, GETVAL)) < 0) in verify_semctl() 99 if ((status = semctl(semid, 0, GETPID)) < 0) in verify_semctl() 111 if ((status = semctl(semid, 0, GETNCNT)) < 0) in verify_semctl() 122 if ((status = semctl(semid, 0, GETZCNT)) < 0) in verify_semctl() 138 semid = SAFE_SEMGET(key, nsems, SEM_RA | IPC_CREAT); in setup() 143 if (semid != -1) in cleanup() [all …]
|
D | semctl08.c | 21 int semid; in run() local 28 semid = semget(key, 1, SEM_RA | IPC_CREAT); in run() 29 if (semid == -1) in run() 33 TEST(semctl(semid, 0, IPC_STAT, arg)); in run() 42 if (semctl(semid, 0, IPC_RMID, arg) == -1) in run()
|
D | semctl09.c | 57 static inline int do_semctl(int semid, int semnum, int cmd) in do_semctl() argument 65 return tst_syscall(__NR_semctl, semid, semnum, cmd, un); in do_semctl() 67 return semctl(semid, semnum, cmd, un); in do_semctl() 137 int i, semid, cnt = 0; in verify_semctl() local 154 semid = do_semctl(TST_RET, 0, SEM_STAT_ANY); in verify_semctl() 160 } else if (semid == -1) { in verify_semctl() 164 TST_RET, semid); in verify_semctl()
|
D | semctl03.c | 29 static int libc_semctl(int semid, int semnum, int cmd, ...) in libc_semctl() argument 31 return semctl(semid, semnum, cmd, arg); in libc_semctl() 34 static int sys_semctl(int semid, int semnum, int cmd, ...) in sys_semctl() argument 36 return tst_syscall(__NR_semctl, semid, semnum, cmd, arg); in sys_semctl() 54 int (*semctl)(int semid, int semnum, int cmd, ...);
|
D | semctl01.c | 241 int *semid; member 284 rval = SAFE_SEMCTL(*(tc->semid), tc->semnum, tc->cmd, tc->arg); in verify_semctl()
|
/third_party/ltp/testcases/kernel/syscalls/ipc/semop/ |
D | semop.h | 10 static inline int sys_semtimedop(int semid, struct sembuf *sops, size_t nsops, in sys_semtimedop() argument 13 return tst_syscall(__NR_semtimedop, semid, sops, nsops, timeout); in sys_semtimedop() 16 static inline int sys_semtimedop_time64(int semid, struct sembuf *sops, in sys_semtimedop_time64() argument 19 return tst_syscall(__NR_semtimedop_time64, semid, sops, nsops, timeout); in sys_semtimedop_time64() 34 static inline int call_semop(struct time64_variants *tv, int semid, in call_semop() argument 38 return tv->semop(semid, sops, nsops); in call_semop() 40 return tv->semtimedop(semid, sops, nsops, timeout); in call_semop()
|
D | semop02.c | 43 int *semid; member 127 if (*tc[i].semid == valid_sem_id) { in run() 140 TEST(call_semop(tv, *(tc[i].semid), ptr, tc[i].t_ops, to)); in run()
|
/third_party/ltp/testcases/kernel/mce-test/tsrc/ |
D | thugetlb.c | 116 int semid; in main() local 228 semid = semget(IPC_PRIVATE, 1, 0666|IPC_CREAT); in main() 229 if (semid == -1) { in main() 233 semaphore = semctl(semid, 0, SETVAL, 1); in main() 238 if (get_semaphore(semid, &sembuffer)) { in main() 265 if (put_semaphore(semid, &sembuffer)) in main() 269 if (get_semaphore(semid, &sembuffer)) in main() 271 if (put_semaphore(semid, &sembuffer)) in main() 278 if (forkflag && get_semaphore(semid, &sembuffer)) { in main() 292 if (forkflag && put_semaphore(semid, &sembuffer)) { in main() [all …]
|
/third_party/ltp/include/ |
D | tst_safe_sysv_ipc.h | 60 int safe_semctl(const char *file, const int lineno, int semid, int semnum, 62 #define SAFE_SEMCTL(semid, semnum, cmd, ...) ({ \ argument 63 int tst_ret_ = safe_semctl(__FILE__, __LINE__, (semid), (semnum), \ 65 (semid) = ((cmd) == IPC_RMID ? -1 : (semid)); \ 68 int safe_semop(const char *file, const int lineno, int semid, struct sembuf *sops, 70 #define SAFE_SEMOP(semid, sops, nsops) \ argument 71 safe_semop(__FILE__, __LINE__, (semid), (sops), (nsops))
|
D | time64_variants.h | 53 int (*semop)(int semid, struct sembuf *sops, size_t nsops); 54 int (*semtimedop)(int semid, struct sembuf *sops, size_t nsops, void *timeout);
|
/third_party/libuv/src/unix/ |
D | os390-syscalls.h | 68 int sem_init(UV_PLATFORM_SEM_T* semid, int pshared, unsigned int value); 69 int sem_destroy(UV_PLATFORM_SEM_T* semid); 70 int sem_post(UV_PLATFORM_SEM_T* semid); 71 int sem_trywait(UV_PLATFORM_SEM_T* semid); 72 int sem_wait(UV_PLATFORM_SEM_T* semid);
|
D | os390-syscalls.c | 514 int sem_init(UV_PLATFORM_SEM_T* semid, int pshared, unsigned int value) { in sem_init() argument 519 int sem_destroy(UV_PLATFORM_SEM_T* semid) { in sem_destroy() argument 524 int sem_post(UV_PLATFORM_SEM_T* semid) { in sem_post() argument 529 int sem_trywait(UV_PLATFORM_SEM_T* semid) { in sem_trywait() argument 534 int sem_wait(UV_PLATFORM_SEM_T* semid) { in sem_wait() argument
|
/third_party/node/deps/uv/src/unix/ |
D | os390-syscalls.h | 68 int sem_init(UV_PLATFORM_SEM_T* semid, int pshared, unsigned int value); 69 int sem_destroy(UV_PLATFORM_SEM_T* semid); 70 int sem_post(UV_PLATFORM_SEM_T* semid); 71 int sem_trywait(UV_PLATFORM_SEM_T* semid); 72 int sem_wait(UV_PLATFORM_SEM_T* semid);
|
D | os390-syscalls.c | 514 int sem_init(UV_PLATFORM_SEM_T* semid, int pshared, unsigned int value) { in sem_init() argument 519 int sem_destroy(UV_PLATFORM_SEM_T* semid) { in sem_destroy() argument 524 int sem_post(UV_PLATFORM_SEM_T* semid) { in sem_post() argument 529 int sem_trywait(UV_PLATFORM_SEM_T* semid) { in sem_trywait() argument 534 int sem_wait(UV_PLATFORM_SEM_T* semid) { in sem_wait() argument
|
/third_party/ltp/lib/ |
D | tst_safe_sysv_ipc.c | 230 int safe_semctl(const char *file, const int lineno, int semid, int semnum, in safe_semctl() argument 243 rval = semctl(semid, semnum, cmd, un); in safe_semctl() 247 "semctl(%i, %i, %i,...) failed", semid, semnum, cmd); in safe_semctl() 250 "Invalid semctl(%i, %i, %i,...) return value %d", semid, in safe_semctl() 257 int safe_semop(const char *file, const int lineno, int semid, struct sembuf *sops, in safe_semop() argument 262 rval = semop(semid, sops, nsops); in safe_semop() 265 "semop(%d, %p, %zu) failed", semid, sops, nsops); in safe_semop() 269 semid, sops, nsops, rval); in safe_semop()
|
/third_party/alsa-lib/src/pcm/ |
D | pcm_direct.h | 137 int semid; /* IPC global semaphore identification */ member 272 if (dmix->semid >= 0) { in snd_pcm_direct_semaphore_discard() 273 if (semctl(dmix->semid, 0, IPC_RMID, NULL) < 0) in snd_pcm_direct_semaphore_discard() 275 dmix->semid = -1; in snd_pcm_direct_semaphore_discard() 283 int err = semop(dmix->semid, op, 2); in snd_pcm_direct_semaphore_down() 294 int err = semop(dmix->semid, &op, 1); in snd_pcm_direct_semaphore_up()
|
D | pcm_direct.c | 65 dmix->semid = semget(dmix->ipc_key, DIRECT_IPC_SEMS, in snd_pcm_direct_semaphore_create_or_connect() 67 if (dmix->semid < 0) in snd_pcm_direct_semaphore_create_or_connect() 73 if (semctl(dmix->semid, i, IPC_STAT, s) < 0) { in snd_pcm_direct_semaphore_create_or_connect() 80 semctl(dmix->semid, i, IPC_SET, s); in snd_pcm_direct_semaphore_create_or_connect() 2115 dmix->semid = -1;
|
/third_party/toybox/toys/pending/ |
D | ipcs.c | 254 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()
|
/third_party/rust/crates/libc/src/unix/haiku/ |
D | mod.rs | 1871 pub fn semctl(semid: ::c_int, semnum: ::c_int, cmd: ::c_int, ...) -> ::c_int; in semctl() 1872 pub fn semop(semid: ::c_int, sops: *mut sembuf, nsops: ::size_t) -> ::c_int; in semop()
|
/third_party/rust/crates/libc/src/unix/bsd/freebsdlike/freebsd/ |
D | mod.rs | 4093 pub fn semctl(semid: ::c_int, semnum: ::c_int, cmd: ::c_int, ...) -> ::c_int; in semctl() 4094 pub fn semop(semid: ::c_int, sops: *mut sembuf, nsops: ::size_t) -> ::c_int; in semop()
|
/third_party/rust/crates/libc/src/unix/linux_like/linux/ |
D | mod.rs | 3920 pub fn semop(semid: ::c_int, sops: *mut ::sembuf, nsops: ::size_t) -> ::c_int; in semop() 3921 pub fn semctl(semid: ::c_int, semnum: ::c_int, cmd: ::c_int, ...) -> ::c_int; in semctl()
|
/third_party/rust/crates/libc/src/fuchsia/ |
D | mod.rs | 3961 pub fn semop(semid: ::c_int, sops: *mut ::sembuf, nsops: ::size_t) -> ::c_int; in semop() 3962 pub fn semctl(semid: ::c_int, semnum: ::c_int, cmd: ::c_int, ...) -> ::c_int; in semctl()
|
/third_party/rust/crates/libc/src/unix/bsd/apple/ |
D | mod.rs | 5147 pub fn semctl(semid: ::c_int, semnum: ::c_int, cmd: ::c_int, ...) -> ::c_int; in semctl() 5148 pub fn semop(semid: ::c_int, sops: *mut sembuf, nsops: ::size_t) -> ::c_int; in semop()
|