/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 | shmat03.c | 56 static int shm_id; variable 61 shm_id = SAFE_SHMGET(IPC_PRIVATE, getpagesize(), 0777); in setup() 69 if (shm_id) in cleanup() 70 SAFE_SHMCTL(shm_id, IPC_RMID, 0); in cleanup() 80 shm_addr = shmat(shm_id, ((void *)1), SHM_RND | SHM_REMAP); in run()
|
D | shmat01.c | 46 static int shm_id = -1; variable 113 addr = shmat(shm_id, *tc->shmaddr, tc->flag); in verify_shmat() 119 SAFE_SHMCTL(shm_id, IPC_STAT, &buf); in verify_shmat() 160 shm_id = SAFE_SHMGET(shm_key, INT_SIZE, SHM_RW | IPC_CREAT | IPC_EXCL); in setup() 165 if (shm_id != -1) in cleanup() 166 SAFE_SHMCTL(shm_id, IPC_RMID, NULL); in cleanup()
|
/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-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-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() 121 shm_id = shmget(IPC_PRIVATE, sizeof(struct shared), 0777|IPC_CREAT); in ptrace_tm_spr() 133 pptr = (struct shared *)shmat(shm_id, NULL, 0); in ptrace_tm_spr() 143 shmctl(shm_id, IPC_RMID, NULL); in ptrace_tm_spr() 151 shmctl(shm_id, IPC_RMID, NULL); in ptrace_tm_spr()
|
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()
|
D | ptrace-pkey.c | 298 int shm_id; in ptrace_pkey() local 302 shm_id = shmget(IPC_PRIVATE, sizeof(*info), 0777 | IPC_CREAT); in ptrace_pkey() 303 info = shmat(shm_id, NULL, 0); in ptrace_pkey() 322 shmctl(shm_id, IPC_RMID, NULL); in ptrace_pkey()
|
D | core-pkey.c | 423 int shm_id; in core_pkey() local 431 shm_id = shmget(IPC_PRIVATE, sizeof(*info), 0777 | IPC_CREAT); in core_pkey() 432 info = shmat(shm_id, NULL, 0); in core_pkey() 451 shmctl(shm_id, IPC_RMID, NULL); in core_pkey()
|
/external/ltp/testcases/kernel/syscalls/ipc/libnewipc/ |
D | libnewipc.c | 88 int shm_id = -1; in probe_free_addr() local 93 shm_id = shmget(probe_key, SHMLBA * 2, SHM_RW | IPC_CREAT | IPC_EXCL); in probe_free_addr() 94 if (shm_id == -1) in probe_free_addr() 97 addr = shmat(shm_id, NULL, 0); in probe_free_addr() 104 if (shmctl(shm_id, IPC_RMID, NULL) == -1) in probe_free_addr()
|
/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 | 115 void rm_shm(int shm_id) in rm_shm() argument 117 if (shm_id == -1) in rm_shm() 123 if (shmctl(shm_id, IPC_RMID, NULL) == -1) { in rm_shm() 126 tst_res(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/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 | 106 int shm_id; variable 930 ret = shmctl(shm_id, IPC_RMID, &ds); 1029 shm_id = shmget(IPC_PRIVATE, total_ram, IPC_CREAT | 0700); 1030 if (shm_id < 0) { 1035 p = shmat(shm_id, (char *)0x50000000, 0); 1054 shm_id = fd;
|