/external/ltp/testcases/kernel/mem/mtest07/ |
D | shm_test.c | 126 static int rm_shared_mem(key_t shm_id, /* id of shared memory segment to be removed */ in rm_shared_mem() argument 133 getpid(), shm_id, shm_addr, cmd); in rm_shared_mem() 134 if (shmctl(shm_id, IPC_RMID, (struct shmid_ds *)shmbuf) == -1) { in rm_shared_mem() 135 dprt("pid[%d]: rm_shared_mem(): shmctl unable to remove shm_id[%d]\n", getpid(), shm_id); in rm_shared_mem() 174 key_t shm_id = 0; /* shared memory id */ in shmat_rd_wr() local 189 if ((shm_id = in shmat_rd_wr() 199 "success got segment id %d\n", getpid(), shm_id); in shmat_rd_wr() 202 if ((shmat_addr = shmat(shm_id, NULL, 0)) == (void *)-1) { in shmat_rd_wr() 203 rm_shared_mem(shm_id, shmat_addr, 0); in shmat_rd_wr() 242 if (rm_shared_mem(shm_id, shmat_addr, 1) == -1) { in shmat_rd_wr()
|
/external/ltp/testcases/kernel/syscalls/ipc/shmat/ |
D | shmat_common.h | 7 int shm_id = -1; in probe_free_addr() local 15 shm_id = shmget(probe_key, SHMLBA*2, SHM_RW | IPC_CREAT | IPC_EXCL); in probe_free_addr() 16 if (shm_id == -1) in probe_free_addr() 20 p = shmat(shm_id, NULL, 0); in probe_free_addr() 27 rm_shm(shm_id); in probe_free_addr()
|
/external/linux-kselftest/tools/testing/selftests/powerpc/ptrace/ |
D | ptrace-gpr.c | 16 int shm_id; variable 28 cptr = (int *)shmat(shm_id, NULL, 0); in gpr() 81 shm_id = shmget(IPC_PRIVATE, sizeof(int) * 2, 0777|IPC_CREAT); in ptrace_gpr() 91 pptr = (int *)shmat(shm_id, NULL, 0); in ptrace_gpr() 99 shmctl(shm_id, IPC_RMID, NULL); in ptrace_gpr() 107 shmctl(shm_id, IPC_RMID, NULL); in ptrace_gpr()
|
D | ptrace-vsx.c | 15 int shm_id; variable 26 cptr = (int *)shmat(shm_id, NULL, 0); in vsx() 68 shm_id = shmget(IPC_PRIVATE, sizeof(int) * 2, 0777|IPC_CREAT); in ptrace_vsx() 86 pptr = (int *)shmat(shm_id, NULL, 0); in ptrace_vsx() 94 shmctl(shm_id, IPC_RMID, NULL); in ptrace_vsx() 102 shmctl(shm_id, IPC_RMID, NULL); in ptrace_vsx()
|
D | ptrace-tm-tar.c | 15 int shm_id; variable 25 cptr = (unsigned long *)shmat(shm_id, NULL, 0); in tm_tar() 124 shm_id = shmget(IPC_PRIVATE, sizeof(int) * 2, 0777|IPC_CREAT); in ptrace_tm_tar() 129 pptr = (unsigned long *)shmat(shm_id, NULL, 0); in ptrace_tm_tar() 139 shmctl(shm_id, IPC_RMID, NULL); in ptrace_tm_tar() 145 shmctl(shm_id, IPC_RMID, NULL); in ptrace_tm_tar()
|
D | ptrace-tm-spd-gpr.c | 16 int shm_id; variable 37 cptr = (int *)shmat(shm_id, NULL, 0); in tm_spd_gpr() 126 shm_id = shmget(IPC_PRIVATE, sizeof(int) * 3, 0777|IPC_CREAT); in ptrace_tm_spd_gpr() 137 pptr = (int *)shmat(shm_id, NULL, 0); in ptrace_tm_spd_gpr() 147 shmctl(shm_id, IPC_RMID, NULL); in ptrace_tm_spd_gpr() 154 shmctl(shm_id, IPC_RMID, NULL); in ptrace_tm_spd_gpr()
|
D | ptrace-tm-spr.c | 21 int shm_id; variable 41 cptr = (struct shared *)shmat(shm_id, NULL, 0); in tm_spr() 122 shm_id = shmget(IPC_PRIVATE, sizeof(struct shared), 0777|IPC_CREAT); in ptrace_tm_spr() 134 pptr = (struct shared *)shmat(shm_id, NULL, 0); in ptrace_tm_spr() 144 shmctl(shm_id, IPC_RMID, NULL); in ptrace_tm_spr() 152 shmctl(shm_id, IPC_RMID, NULL); in ptrace_tm_spr()
|
D | ptrace-tm-spd-tar.c | 15 int shm_id; variable 31 cptr = (int *)shmat(shm_id, NULL, 0); in tm_spd_tar() 136 shm_id = shmget(IPC_PRIVATE, sizeof(int) * 3, 0777|IPC_CREAT); in ptrace_tm_spd_tar() 141 pptr = (int *)shmat(shm_id, NULL, 0); in ptrace_tm_spd_tar() 152 shmctl(shm_id, IPC_RMID, NULL); in ptrace_tm_spd_tar() 159 shmctl(shm_id, IPC_RMID, NULL); in ptrace_tm_spd_tar()
|
D | ptrace-tm-vsx.c | 15 int shm_id; variable 38 cptr = (unsigned long *)shmat(shm_id, NULL, 0); in tm_vsx() 121 shm_id = shmget(IPC_PRIVATE, sizeof(int) * 2, 0777|IPC_CREAT); in ptrace_tm_vsx() 139 pptr = (unsigned long *)shmat(shm_id, NULL, 0); in ptrace_tm_vsx() 147 shmctl(shm_id, IPC_RMID, NULL); in ptrace_tm_vsx() 153 shmctl(shm_id, IPC_RMID, NULL); in ptrace_tm_vsx()
|
D | ptrace-tm-spd-vsx.c | 15 int shm_id; variable 51 cptr = (int *)shmat(shm_id, NULL, 0); in tm_spd_vsx() 137 shm_id = shmget(IPC_PRIVATE, sizeof(int) * 3, 0777|IPC_CREAT); in ptrace_tm_spd_vsx() 156 pptr = (int *)shmat(shm_id, NULL, 0); in ptrace_tm_spd_vsx() 164 shmctl(shm_id, IPC_RMID, NULL); in ptrace_tm_spd_vsx() 170 shmctl(shm_id, IPC_RMID, NULL); in ptrace_tm_spd_vsx()
|
D | ptrace-tar.c | 15 int shm_id; variable 24 cptr = (int *)shmat(shm_id, NULL, 0); in tar() 85 shm_id = shmget(IPC_PRIVATE, sizeof(int) * 3, 0777|IPC_CREAT); in ptrace_tar() 96 pptr = (int *)shmat(shm_id, NULL, 0); in ptrace_tar() 120 shmctl(shm_id, IPC_RMID, NULL); in ptrace_tar()
|
D | ptrace-tm-gpr.c | 16 int shm_id; variable 30 cptr = (unsigned long *)shmat(shm_id, NULL, 0); in tm_gpr() 120 shm_id = shmget(IPC_PRIVATE, sizeof(int) * 2, 0777|IPC_CREAT); in ptrace_tm_gpr() 130 pptr = (unsigned long *)shmat(shm_id, NULL, 0); in ptrace_tm_gpr() 143 shmctl(shm_id, IPC_RMID, NULL); in ptrace_tm_gpr()
|
/external/autotest/client/tests/synctest/src/ |
D | synctest.c | 31 int shm_id; in main() local 53 shm_id = shmget(IPC_PRIVATE, 10, IPC_CREAT | IPC_EXCL | 0600); in main() 54 if (shm_id == -1) { in main() 60 shm_addr = shmat(shm_id, NULL, 0); in main() 153 if (shmctl(shm_id, IPC_RMID, &shm_desc) == -1) { in main()
|
/external/ltp/testcases/kernel/mem/hugetlb/lib/ |
D | hugetlb.c | 104 void rm_shm(int shm_id) in rm_shm() argument 106 if (shm_id == -1) in rm_shm() 112 if (shmctl(shm_id, IPC_RMID, NULL) == -1) { in rm_shm() 115 tst_resm(TINFO, "id = %d", shm_id); in rm_shm()
|
D | hugetlb.h | 54 void rm_shm(int shm_id);
|
/external/ltp/testcases/kernel/syscalls/ipc/lib/ |
D | libipc.c | 157 void rm_shm(int shm_id) in rm_shm() argument 159 if (shm_id == -1) { /* no segment to remove */ in rm_shm() 167 if (shmctl(shm_id, IPC_RMID, NULL) == -1) { in rm_shm() 170 tst_resm(TINFO, "id = %d", shm_id); in rm_shm()
|
D | ipcshm.h | 49 void rm_shm(int shm_id);
|
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_setparam/ |
D | 9-1.c | 109 int *child_pid, oldcount, newcount, shm_id, i; in main() local 129 shm_id = shmget(key, sizeof(int), IPC_CREAT | 0600); in main() 130 if (shm_id < 0) { in main() 135 shmptr = shmat(shm_id, 0, 0); in main()
|
/external/fio/ |
D | memory.c | 76 td->shm_id = shmget(IPC_PRIVATE, total_mem, flags); in alloc_mem_shm() 77 dprint(FD_MEM, "shmget %u, %d\n", total_mem, td->shm_id); in alloc_mem_shm() 78 if (td->shm_id < 0) { in alloc_mem_shm() 99 td->orig_buffer = shmat(td->shm_id, NULL, 0); in alloc_mem_shm() 100 dprint(FD_MEM, "shmat %d, %p\n", td->shm_id, td->orig_buffer); in alloc_mem_shm() 119 dprint(FD_MEM, "shmdt/ctl %d %p\n", td->shm_id, td->orig_buffer); in free_mem_shm() 121 shmctl(td->shm_id, IPC_RMID, &sbuf); in free_mem_shm()
|
D | fio.h | 234 int shm_id; member 473 extern int shm_id;
|
D | init.c | 285 shmctl(shm_id, IPC_RMID, &sbuf); in free_threads_shm() 286 shm_id = -1; in free_threads_shm() 334 shm_id = shmget(0, size, IPC_CREAT | 0600); in setup_thread_area() 335 if (shm_id != -1) in setup_thread_area() 351 if (shm_id == -1) in setup_thread_area() 354 threads = shmat(shm_id, NULL, 0); in setup_thread_area() 360 shmctl(shm_id, IPC_RMID, NULL); in setup_thread_area()
|
D | backend.c | 75 int shm_id = 0; variable
|
/external/autotest/client/tests/aiostress/ |
D | aio-stress.c | 105 int shm_id; variable 910 ret = shmctl(shm_id, IPC_RMID, &ds); 1009 shm_id = shmget(IPC_PRIVATE, total_ram, IPC_CREAT | 0700); 1010 if (shm_id < 0) { 1015 p = shmat(shm_id, (char *)0x50000000, 0); 1034 shm_id = fd;
|
/external/ltp/testcases/kernel/io/ltp-aiodio/ |
D | aio-stress.c | 102 int shm_id; variable 926 ret = shmctl(shm_id, IPC_RMID, &ds); 1025 shm_id = shmget(IPC_PRIVATE, total_ram, IPC_CREAT | 0700); 1026 if (shm_id < 0) { 1031 p = shmat(shm_id, (char *)0x50000000, 0); 1050 shm_id = fd;
|