/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/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 | 158 void rm_shm(int shm_id) in rm_shm() argument 160 if (shm_id == -1) { /* no segment to remove */ in rm_shm() 168 if (shmctl(shm_id, IPC_RMID, NULL) == -1) { in rm_shm() 171 tst_resm(TINFO, "id = %d", shm_id); in rm_shm()
|
D | ipcshm.h | 49 void rm_shm(int shm_id);
|
/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 | 185 int shm_id; member 380 extern int shm_id;
|
D | init.c | 283 shmctl(shm_id, IPC_RMID, &sbuf); in free_threads_shm() 284 shm_id = -1; in free_threads_shm() 335 shm_id = shmget(0, size, IPC_CREAT | 0600); in setup_thread_area() 336 if (shm_id != -1) in setup_thread_area() 352 if (shm_id == -1) in setup_thread_area() 355 threads = shmat(shm_id, NULL, 0); in setup_thread_area()
|
D | backend.c | 76 int shm_id = 0; variable 2020 int ret = fork_main(shm_id, i); in run_threads()
|
/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 | 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;
|