Home
last modified time | relevance | path

Searched refs:shmid (Results 1 - 25 of 68) sorted by relevance

123

/third_party/ltp/testcases/kernel/mem/shmt/
H A Dshmt09.c75 int shmid; in main() local
94 if ((shmid = shmget(key, 10 * K_1, IPC_CREAT | 0666)) < 0) { in main()
98 "Error: shmget Failed, shmid = %d, errno = %d", in main()
99 shmid, errno); in main()
102 c1 = shmat(shmid, NULL, 0); in main()
106 "Error: shmat Failed, shmid = %d, errno = %d", in main()
107 shmid, errno); in main()
108 rm_shm(shmid); in main()
119 rm_shm(shmid); in main()
123 c2 = shmat(shmid, v in main()
189 rm_shm(int shmid) rm_shm() argument
[all...]
H A Dshmt06.c68 int pid, pid1, shmid; in main() local
87 if ((shmid = shmget(key, SIZE, IPC_CREAT | 0666)) < 0) { in main()
89 tst_resm(TFAIL, "Error: shmget: shmid = %d, errno = %d", in main()
90 shmid, errno); in main()
96 cp = shmat(shmid, NULL, 0); in main()
101 "Error: shmat: shmid = %d, errno = %d", in main()
102 shmid, errno); in main()
110 rm_shm(shmid); in main()
140 rm_shm(shmid); in main()
146 int shmid, chld_pi in child() local
210 rm_shm(int shmid) rm_shm() argument
[all...]
H A Dshmt02.c58 register int shmid; in main() local
67 if ((shmid = shmget(key, 16 * K_1, IPC_CREAT | 0666)) < 0) { in main()
70 "shmget Failed: shmid = %d, errno = %d", in main()
71 shmid, errno); in main()
78 cp = shmat(shmid, NULL, 0); in main()
82 tst_resm(TFAIL, "shmat Failed: shmid = %d, errno = %d", in main()
83 shmid, errno); in main()
84 rm_shm(shmid); in main()
95 rm_shm(shmid); in main()
99 "Error in shared memory contents: shmid in main()
110 rm_shm(int shmid) rm_shm() argument
[all...]
H A Dshmt04.c69 int pid, pid1, shmid; in main() local
88 if ((shmid = shmget(key, SIZE, IPC_CREAT | 0666)) < 0) { in main()
90 tst_resm(TFAIL, "Error: shmget: shmid = %d, errno = %d", in main()
91 shmid, errno); in main()
97 cp = shmat(shmid, NULL, 0); in main()
102 "Error: shmat: shmid = %d, errno = %d", in main()
103 shmid, errno); in main()
111 rm_shm(shmid); in main()
141 rm_shm(shmid); in main()
147 int shmid, chld_pi in child() local
187 rm_shm(int shmid) rm_shm() argument
[all...]
H A Dshmt03.c60 int shmid; in main() local
68 if ((shmid = shmget(key, 16 * K_1, IPC_CREAT | 0666)) < 0) { in main()
71 "shmget Failed: shmid = %d, errno = %d", in main()
72 shmid, errno); in main()
79 if ((cp1 = shmat(shmid, NULL, 0)) == (char *)-1) { in main()
81 tst_resm(TFAIL, "shmat Failed: shmid = %d, errno = %d", in main()
82 shmid, errno); in main()
93 if ((cp2 = shmat(shmid, NULL, 0)) == (char *)-1) { in main()
95 tst_resm(TFAIL, "shmat Failed: shmid = %d, errno = %d", in main()
96 shmid, errn in main()
123 rm_shm(int shmid) rm_shm() argument
[all...]
H A Dshmt08.c59 int shmid; in main() local
65 if ((shmid = shmget(key, 24 * K_1, IPC_CREAT | 0666)) < 0) { in main()
68 "Error: shmget: shmid = %d, errno = %d\n", in main()
69 shmid, errno); in main()
72 cp = shmat(shmid, NULL, 0); in main()
75 rm_shm(shmid); in main()
79 cp1 = shmat(shmid, NULL, 0); in main()
82 rm_shm(shmid); in main()
103 rm_shm(shmid); in main()
107 static int rm_shm(int shmid) in rm_shm() argument
[all...]
H A Dshmt10.c62 int shmid; variable
96 if ((shmid = shmget(key, SIZE, IPC_CREAT | 0666)) < 0) { in main()
98 tst_brkm(TFAIL, NULL, "Error: shmid = %d", shmid); in main()
111 if ((c1 = shmat(shmid, NULL, 0)) == (char *)-1) { in main()
113 "Error shmat: iter %d, shmid = %d", i, in main()
114 shmid); in main()
126 rm_shm(shmid); in main()
130 static int rm_shm(int shmid) in rm_shm() argument
132 if (shmctl(shmid, IPC_RMI in rm_shm()
[all...]
H A Dshmt07.c63 int shmid, pid, status; in main() local
72 if ((shmid = shmget(key, SIZE, IPC_CREAT | 0666)) < 0) { in main()
75 "Error: shmget: shmid = %d, errno = %d", in main()
76 shmid, errno); in main()
78 cp = shmat(shmid, NULL, 0); in main()
83 "Error: shmat: shmid = %d, errno = %d", in main()
84 shmid, errno); in main()
85 rm_shm(shmid); in main()
117 rm_shm(shmid); in main()
121 static int rm_shm(int shmid) in rm_shm() argument
[all...]
H A Dshmt05.c60 int shmid, shmid1; in main() local
73 if ((shmid = shmget(key[0], SIZE, IPC_CREAT | 0666)) < 0) { in main()
76 "Error: shmget: shmid = %d, errno = %d\n", in main()
77 shmid, errno); in main()
79 cp = shmat(shmid, NULL, 0); in main()
83 rm_shm(shmid); in main()
110 rm_shm(shmid); in main()
116 static int rm_shm(int shmid) in rm_shm() argument
118 if (shmctl(shmid, IPC_RMID, NULL) == -1) { in rm_shm()
122 "shmctl Failed to remove: shmid in rm_shm()
[all...]
/third_party/musl/libc-test/src/functional/
H A Dipc_shm.c31 int shmid; in set() local
39 T(shmid = shmget(k, 100, IPC_CREAT|0666)); in set()
40 T(shmctl(shmid, IPC_RMID, 0)); in set()
41 T(shmid = shmget(k, 100, IPC_CREAT|IPC_EXCL|0666)); in set()
52 T(shmctl(shmid, IPC_STAT, &shmid_ds)); in set()
70 if ((p=shmat(shmid, 0, 0)) == 0) in set()
72 T(shmctl(shmid, IPC_STAT, &shmid_ds)); in set()
86 int shmid; in get() local
90 T(shmid = shmget(k, 0, 0)); in get()
93 if ((p=shmat(shmid, in get()
[all...]
/third_party/ltp/testcases/kernel/mem/hugetlb/hugeshmat/
H A Dhugeshmat05.c44 int shmid; in shm_test() local
47 shmid = shmget(IPC_PRIVATE, size, 0600 | IPC_CREAT | SHM_HUGETLB); in shm_test()
48 if (shmid < 0) in shm_test()
51 shmaddr = shmat(shmid, 0, 0); in shm_test()
53 shmctl(shmid, IPC_RMID, NULL); in shm_test()
62 shmctl(shmid, IPC_RMID, NULL); in shm_test()
66 shmctl(shmid, IPC_RMID, NULL); in shm_test()
H A Dhugeshmat04.c48 int status, shmid; in shared_hugepage() local
53 shmid = shmget(IPC_PRIVATE, size, SHM_HUGETLB | IPC_CREAT | 0777); in shared_hugepage()
54 if (shmid < 0) in shared_hugepage()
64 buf = shmat(shmid, (void *)boundary, SHM_RND | 0777); in shared_hugepage()
66 shmctl(shmid, IPC_RMID, NULL); in shared_hugepage()
77 shmctl(shmid, IPC_RMID, NULL); in shared_hugepage()
/third_party/mesa3d/src/gallium/winsys/sw/dri/
H A Ddri_sw_winsys.c60 int shmid; member
102 dri_sw_dt->shmid = shmget(IPC_PRIVATE, size, IPC_CREAT | 0600); in alloc_shm()
103 if (dri_sw_dt->shmid < 0) in alloc_shm()
106 addr = (char *) shmat(dri_sw_dt->shmid, NULL, 0); in alloc_shm()
108 shmctl(dri_sw_dt->shmid, IPC_RMID, NULL); in alloc_shm()
145 dri_sw_dt->shmid = -1; in dri_sw_displaytarget_create()
173 if (dri_sw_dt->shmid >= 0) { in dri_sw_displaytarget_destroy()
176 shmctl(dri_sw_dt->shmid, IPC_RMID, NULL); in dri_sw_displaytarget_destroy()
232 if (dri_sw_dt->shmid < 0) in dri_sw_displaytarget_get_handle()
234 whandle->handle = dri_sw_dt->shmid; in dri_sw_displaytarget_get_handle()
[all...]
/third_party/ltp/include/
H A Dtst_safe_sysv_ipc.h40 void *safe_shmat(const char *file, const int lineno, int shmid,
42 #define SAFE_SHMAT(shmid, shmaddr, shmflg) \
43 safe_shmat(__FILE__, __LINE__, (shmid), (shmaddr), (shmflg))
48 int safe_shmctl(const char *file, const int lineno, int shmid, int cmd,
50 #define SAFE_SHMCTL(shmid, cmd, buf) ({ \
51 int tst_ret_ = safe_shmctl(__FILE__, __LINE__, (shmid), (cmd), (buf)); \
52 (shmid) = ((cmd) == IPC_RMID ? -1 : (shmid)); \
/third_party/ltp/testcases/kernel/syscalls/ipc/shmctl/
H A Dshmctl04.c62 int shmid, size, rss, swap; in parse_proc_sysvipc() local
72 &shmid, &size, &rss, &swap) > 0) { in parse_proc_sysvipc()
77 if (shmid > shmid_max) in parse_proc_sysvipc()
78 shmid_max = shmid; in parse_proc_sysvipc()
117 int i, shmid, cnt = 0; in verify_shminfo() local
130 shmid = shmctl(TST_RET, SHM_STAT_ANY, &ds); in verify_shminfo()
132 if (shmid == -1) { in verify_shminfo()
136 "SHM_INFO returned valid index %li maps to shmid %i", in verify_shminfo()
137 TST_RET, shmid); in verify_shminfo()
H A Dshmctl06.c27 int shmid; in run() local
33 shmid = shmget(key, SHM_SIZE, IPC_CREAT | IPC_EXCL | SHM_RW); in run()
34 if (shmid == -1) in run()
37 TEST(shmctl(shmid, IPC_STAT, (struct shmid_ds *)&buf_ds)); in run()
46 SAFE_SHMCTL(shmid, IPC_RMID, NULL); in run()
H A Dshmctl02.c20 * * EINVAL - the shmid is not valid
21 * * EINVAL - the shmid belongs to removed shm
47 static int libc_shmctl(int shmid, int cmd, void *buf) in libc_shmctl() argument
49 return shmctl(shmid, cmd, buf); in libc_shmctl()
52 static int sys_shmctl(int shmid, int cmd, void *buf) in sys_shmctl() argument
54 return tst_syscall(__NR_shmctl, shmid, cmd, buf); in sys_shmctl()
79 int (*shmctl)(int shmid, int cmd, void *buf);
/third_party/ltp/testcases/kernel/mem/hugetlb/hugeshmctl/
H A Dhugeshmctl02.c39 int *shmid; member
48 /* EINVAL - the shmid is not valid */
54 static int libc_shmctl(int shmid, int cmd, void *buf) in libc_shmctl() argument
56 return shmctl(shmid, cmd, buf); in libc_shmctl()
59 static int sys_shmctl(int shmid, int cmd, void *buf) in sys_shmctl() argument
61 return tst_syscall(__NR_shmctl, shmid, cmd, buf); in sys_shmctl()
66 int (*shmctl)(int shmid, int cmd, void *buf);
84 TEST(tv->shmctl(*(tcases[i].shmid), tcases[i].cmd, tcases[i].sbuf)); in test_hugeshmctl()
/third_party/ltp/testcases/kernel/controllers/cpuset/cpuset_memory_test/
H A Dcpuset_memory_test.c247 static int shmid; in shm() local
261 shmid = shmget(key, memsize, flag); in shm()
262 if (shmid == -1) in shm()
264 shmctl(shmid, IPC_RMID, NULL); in shm()
266 shmid = shmget(key, memsize, flag); in shm()
267 if (shmid == -1) in shm()
270 p = shmat(shmid, NULL, 0); in shm()
272 shmctl(shmid, IPC_RMID, NULL); in shm()
279 if (shmctl(shmid, IPC_RMID, NULL) == -1) in shm()
/third_party/ltp/testcases/kernel/mem/hugetlb/hugefork/
H A Dhugefork02.c18 static int shmid = -1; variable
33 shmaddr = SAFE_SHMAT(shmid, 0, SHM_RND); in do_child()
57 shmid = SAFE_SHMGET(2, size, SHM_HUGETLB|IPC_CREAT|SHM_R|SHM_W); in run_test()
77 if (shmid >= 0) in cleanup()
78 SAFE_SHMCTL(shmid, IPC_RMID, NULL); in cleanup()
/third_party/ltp/testcases/kernel/syscalls/mremap/
H A Dmremap04.c95 int shmid; /* shared memory identifier. */ variable
194 shmid = shmget(shmkey, newsize, IPC_CREAT | SHM_MODE); in setup()
195 if (shmid == -1) { in setup()
202 * memory identifier specified by "shmid" to the data segment of in setup()
206 shmaddr = shmat(shmid, NULL, 0); in setup()
236 if (shmctl(shmid, IPC_RMID, 0) < 0) { in cleanup()
/third_party/alsa-lib/src/
H A Dshmarea.c51 int shmid; member
61 * \param shmid IPC SHM ID
68 struct snd_shm_area *snd_shm_area_create(int shmid, void *ptr) in snd_shm_area_create() argument
72 area->shmid = shmid; in snd_shm_area_create()
/third_party/ltp/lib/
H A Dtst_safe_sysv_ipc.c160 void *safe_shmat(const char *file, const int lineno, int shmid, in safe_shmat() argument
165 rval = shmat(shmid, shmaddr, shmflg); in safe_shmat()
169 "shmat(%i, %p, %x) failed", shmid, shmaddr, shmflg); in safe_shmat()
192 int safe_shmctl(const char *file, const int lineno, int shmid, int cmd, in safe_shmctl() argument
197 rval = shmctl(shmid, cmd, buf); in safe_shmctl()
201 "shmctl(%i, %i, %p) failed", shmid, cmd, buf); in safe_shmctl()
204 "Invalid shmctl(%i, %i, %p) return value %d", shmid, in safe_shmctl()
/third_party/ltp/testcases/kernel/mem/hugetlb/hugemmap/
H A Dhugemmap05.c60 static int key = -1, shmid = -1, fd = -1; variable
79 shmid = SAFE_SHMGET(key, (length / 2 * hugepagesize), in test_overcommit()
115 tst_res(TINFO, "shmid: 0x%x", shmid); in test_overcommit()
116 shmaddr = SAFE_SHMAT(shmid, ADDR, SHMAT_FLAGS); in test_overcommit()
151 SAFE_SHMCTL(shmid, IPC_RMID, NULL); in test_overcommit()
163 if (opt_shmid && shmid != -1) in cleanup()
164 SAFE_SHMCTL(shmid, IPC_RMID, NULL); in cleanup()
/third_party/mesa3d/src/glx/
H A Ddrisw_glx.c60 XCreateDrawable(struct drisw_drawable * pdp, int shmid, Display * dpy) in XCreateDrawable() argument
65 if ((pdp->shminfo.shmid > 0) && (shmid != pdp->shminfo.shmid)) in XCreateDrawable()
69 if (!xshm_error && shmid >= 0) { in XCreateDrawable()
70 pdp->shminfo.shmid = shmid; in XCreateDrawable()
100 pdp->shminfo.shmid = -1; in XCreateDrawable()
127 if (pdp->shminfo.shmid > 0) in XDestroyDrawable()
183 int shmid, cha in swrastXPutImage()
180 swrastXPutImage(__DRIdrawable * draw, int op, int srcx, int srcy, int x, int y, int w, int h, int stride, int shmid, char *data, void *loaderPrivate) swrastXPutImage() argument
215 swrastPutImageShm(__DRIdrawable * draw, int op, int x, int y, int w, int h, int stride, int shmid, char *shmaddr, unsigned offset, void *loaderPrivate) swrastPutImageShm() argument
231 swrastPutImageShm2(__DRIdrawable * draw, int op, int x, int y, int w, int h, int stride, int shmid, char *shmaddr, unsigned offset, void *loaderPrivate) swrastPutImageShm2() argument
309 swrastGetImageShm2(__DRIdrawable * read, int x, int y, int w, int h, int shmid, void *loaderPrivate) swrastGetImageShm2() argument
339 swrastGetImageShm(__DRIdrawable * read, int x, int y, int w, int h, int shmid, void *loaderPrivate) swrastGetImageShm() argument
[all...]

Completed in 8 milliseconds

123