Home
last modified time | relevance | path

Searched refs:shmid (Results 51 - 75 of 122) sorted by relevance

12345

/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()
/kernel/liteos_a/testsuites/unittest/basic/mem/shm/full/
H A Dshm_test_009.cpp83 int childPid, oldcount, newcount, shmid; in Testcase() local
94 shmid = shmget(IPC_PRIVATE, sizeof(int), IPC_CREAT | 0600); in Testcase()
95 ICUNIT_ASSERT_NOT_EQUAL(shmid, -1, shmid); in Testcase()
97 g_shmptr = (int *)shmat(shmid, 0, 0); in Testcase()
150 ret = shmctl(shmid, IPC_RMID, NULL); in Testcase()
/kernel/liteos_a/syscall/
H A Dvm_syscall.c81 void *SysShmAt(int shmid, const void *shmaddr, int shmflg) in SysShmAt() argument
85 ret = ShmAt(shmid, shmaddr, shmflg); in SysShmAt()
93 int SysShmCtl(int shmid, int cmd, struct shmid_ds *buf) in SysShmCtl() argument
97 ret = ShmCtl(shmid, cmd, buf); in SysShmCtl()
/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/ltp/testcases/kernel/syscalls/ipc/shmctl/
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/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...]
/kernel/linux/linux-5.10/ipc/
H A Dshm.c159 " key shmid perms size cpid lpid nattch uid gid cuid cgid atime dtime ctime rss swap\n", in shm_init()
161 " key shmid perms size cpid lpid nattch uid gid cuid cgid atime dtime ctime rss swap\n", in shm_init()
782 * shmid gets reported as "inode#" in /proc/pid/maps. in newseg()
986 static int shmctl_down(struct ipc_namespace *ns, int shmid, int cmd, in shmctl_down() argument
996 ipcp = ipcctl_obtain_check(ns, &shm_ids(ns), shmid, cmd, in shmctl_down()
1075 static int shmctl_stat(struct ipc_namespace *ns, int shmid, in shmctl_stat() argument
1085 shp = shm_obtain_object(ns, shmid); in shmctl_stat()
1091 shp = shm_obtain_object_check(ns, shmid); in shmctl_stat()
1159 static int shmctl_do_lock(struct ipc_namespace *ns, int shmid, int cmd) in shmctl_do_lock() argument
1166 shp = shm_obtain_object_check(ns, shmid); in shmctl_do_lock()
1235 ksys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf, int version) ksys_shmctl() argument
1295 ksys_old_shmctl(int shmid, int cmd, struct shmid_ds __user *buf) ksys_old_shmctl() argument
1430 compat_ksys_shmctl(int shmid, int cmd, void __user *uptr, int version) compat_ksys_shmctl() argument
1491 compat_ksys_old_shmctl(int shmid, int cmd, void __user *uptr) compat_ksys_old_shmctl() argument
1512 do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr, unsigned long shmlba) do_shmat() argument
[all...]
/kernel/linux/linux-6.6/ipc/
H A Dshm.c159 " key shmid perms size cpid lpid nattch uid gid cuid cgid atime dtime ctime rss swap\n", in shm_init()
161 " key shmid perms size cpid lpid nattch uid gid cuid cgid atime dtime ctime rss swap\n", in shm_init()
794 * shmid gets reported as "inode#" in /proc/pid/maps. in newseg()
996 static int shmctl_down(struct ipc_namespace *ns, int shmid, int cmd, in shmctl_down() argument
1006 ipcp = ipcctl_obtain_check(ns, &shm_ids(ns), shmid, cmd, in shmctl_down()
1085 static int shmctl_stat(struct ipc_namespace *ns, int shmid, in shmctl_stat() argument
1095 shp = shm_obtain_object(ns, shmid); in shmctl_stat()
1101 shp = shm_obtain_object_check(ns, shmid); in shmctl_stat()
1169 static int shmctl_do_lock(struct ipc_namespace *ns, int shmid, int cmd) in shmctl_do_lock() argument
1176 shp = shm_obtain_object_check(ns, shmid); in shmctl_do_lock()
1245 ksys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf, int version) ksys_shmctl() argument
1305 ksys_old_shmctl(int shmid, int cmd, struct shmid_ds __user *buf) ksys_old_shmctl() argument
1440 compat_ksys_shmctl(int shmid, int cmd, void __user *uptr, int version) compat_ksys_shmctl() argument
1501 compat_ksys_old_shmctl(int shmid, int cmd, void __user *uptr) compat_ksys_old_shmctl() argument
1522 do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr, unsigned long shmlba) do_shmat() argument
[all...]
/third_party/ltp/testcases/kernel/controllers/memcg/functional/
H A Dmemcg_process.c207 static int shmid; in shm() local
221 shmid = shmget(key, memsize, flag); in shm()
222 if (shmid == -1) in shm()
225 p = shmat(shmid, NULL, 0); in shm()
227 shmctl(shmid, IPC_RMID, NULL); in shm()
231 if (shmctl(shmid, IPC_RMID, NULL) == -1) in shm()
/third_party/ltp/testcases/kernel/mce-test/tsrc/
H A Dhugepage.h105 int shmid; in alloc_shm_hugepage() local
106 if ((shmid = shmget(*key, size, in alloc_shm_hugepage()
111 addr = shmat(shmid, (void *)0x0UL, 0); in alloc_shm_hugepage()
114 shmctl(shmid, IPC_RMID, NULL); in alloc_shm_hugepage()
117 *key = shmid; in alloc_shm_hugepage()
/third_party/ltp/testcases/kernel/mce-test/hwpoison/
H A Dhugepage.h105 int shmid; in alloc_shm_hugepage() local
106 if ((shmid = shmget(*key, size, in alloc_shm_hugepage()
111 addr = shmat(shmid, (void *)0x0UL, 0); in alloc_shm_hugepage()
114 shmctl(shmid, IPC_RMID, NULL); in alloc_shm_hugepage()
117 *key = shmid; in alloc_shm_hugepage()
/third_party/ltp/testcases/kernel/syscalls/setns/
H A Dsetns02.c36 static int shmid; variable
87 p = shmat(shmid, NULL, 0); in do_child_newipc()
102 p = shmat(shmid, NULL, 0); in do_child_newipc()
165 shmid = SAFE_SHMGET(ipc_key, getpagesize(), IPC_CREAT | 0666); in setup()
175 SAFE_SHMCTL(shmid, IPC_RMID, NULL); in cleanup()
/third_party/alsa-lib/src/pcm/
H A Dpcm_mmap.c233 int snd_pcm_channel_info_shm(snd_pcm_t *pcm, snd_pcm_channel_info_t *info, int shmid) in snd_pcm_channel_info_shm() argument
253 info->u.shm.shmid = shmid; in snd_pcm_channel_info_shm()
327 if (i1->u.shm.shmid != i->u.shm.shmid) in snd_pcm_mmap()
352 if (i->u.shm.shmid < 0) { in snd_pcm_mmap()
360 i->u.shm.shmid = id; in snd_pcm_mmap()
361 ptr = shmat(i->u.shm.shmid, 0, 0); in snd_pcm_mmap()
381 if (i1->u.shm.shmid < 0) { in snd_pcm_mmap()
382 i1->u.shm.shmid in snd_pcm_mmap()
[all...]
/third_party/mesa3d/src/gallium/winsys/sw/xlib/
H A Dxlib_sw_winsys.c126 shminfo->shmid = -1; in alloc_shm()
130 shminfo->shmid = shmget(IPC_PRIVATE, size, IPC_CREAT | 0600); in alloc_shm()
131 if (shminfo->shmid < 0) { in alloc_shm()
135 shminfo->shmaddr = (char *) shmat(shminfo->shmid, 0, 0); in alloc_shm()
137 shmctl(shminfo->shmid, IPC_RMID, 0); in alloc_shm()
170 shmctl(xlib_dt->shminfo.shmid, IPC_RMID, 0); in alloc_shm_ximage()
185 shmctl(xlib_dt->shminfo.shmid, IPC_RMID, 0); in alloc_shm_ximage()
260 if (xlib_dt->shminfo.shmid >= 0) { in xlib_displaytarget_destroy()
262 shmctl(xlib_dt->shminfo.shmid, IPC_RMID, 0); in xlib_displaytarget_destroy()
264 xlib_dt->shminfo.shmid in xlib_displaytarget_destroy()
[all...]
/third_party/toybox/toys/pending/
H A Dipcs.c13 usage: ipcs [[-smq] -i shmid] | [[-asmq] [-tcplu]]
130 printf("\nShared memory Segment shmid=%d\n" in show_shm_id()
152 int max_nr, i, shmid; in shm_array() local
192 "shmid", "owner", "attached", "detached", "changed"); in shm_array()
196 "shmid", "owner", "cpid", "lpid"); in shm_array()
200 "shmid", "perms", "cuid", "cgid", "uid", "gid"); in shm_array()
204 "key", "shmid", "owner", "perms", "bytes", "nattch", in shm_array()
209 if ((shmid = shmctl(i, SHM_STAT, &buf)) < 0 ) continue; in shm_array()
212 printf("%-10d %-10.10s", shmid, pw->pw_name); in shm_array()
213 else printf("%-10d %-10.10d", shmid, bu in shm_array()
[all...]
/third_party/skia/third_party/externals/swiftshader/src/Main/
H A DFrameBufferX11.cpp68 shminfo.shmid = shmget(IPC_PRIVATE, x_image->bytes_per_line * x_image->height, IPC_CREAT | SHM_R | SHM_W); in FrameBufferX11()
69 shminfo.shmaddr = x_image->data = (char*)shmat(shminfo.shmid, 0, 0); in FrameBufferX11()
83 shmctl(shminfo.shmid, IPC_RMID, 0); in FrameBufferX11()
117 shmctl(shminfo.shmid, IPC_RMID, 0); in ~FrameBufferX11()
/kernel/linux/linux-5.10/tools/testing/selftests/powerpc/benchmarks/
H A Dcontext_switch.c328 int shmid; in futex_setup() local
331 shmid = shmget(IPC_PRIVATE, getpagesize(), SHM_R | SHM_W); in futex_setup()
332 if (shmid < 0) { in futex_setup()
337 shmaddr = shmat(shmid, NULL, 0); in futex_setup()
340 shmctl(shmid, IPC_RMID, NULL); in futex_setup()
344 shmctl(shmid, IPC_RMID, NULL); in futex_setup()
/kernel/linux/linux-6.6/tools/testing/selftests/powerpc/benchmarks/
H A Dcontext_switch.c328 int shmid; in futex_setup() local
331 shmid = shmget(IPC_PRIVATE, getpagesize(), SHM_R | SHM_W); in futex_setup()
332 if (shmid < 0) { in futex_setup()
337 shmaddr = shmat(shmid, NULL, 0); in futex_setup()
340 shmctl(shmid, IPC_RMID, NULL); in futex_setup()
344 shmctl(shmid, IPC_RMID, NULL); in futex_setup()
/kernel/linux/linux-5.10/include/linux/
H A Dshm.h17 long do_shmat(int shmid, char __user *shmaddr, int shmflg, unsigned long *addr,
27 static inline long do_shmat(int shmid, char __user *shmaddr, in do_shmat() argument
/kernel/linux/linux-6.6/include/linux/
H A Dshm.h17 long do_shmat(int shmid, char __user *shmaddr, int shmflg, unsigned long *addr,
27 static inline long do_shmat(int shmid, char __user *shmaddr, in do_shmat() argument
/third_party/ltp/testcases/kernel/mem/mtest06/
H A Dshmat1.c227 int shmid; /* shared memory id */ in shmat_shmdt() local
239 if ((shmid = shmget(shmkey, fsize, IPC_CREAT | 0666)) == -1) { in shmat_shmdt()
248 if ((map_address = shmat(shmid, NULL, 0)) in shmat_shmdt()
279 if (shmctl(shmid, IPC_RMID, NULL)) { in shmat_shmdt()
/kernel/liteos_a/kernel/base/include/
H A Dlos_vm_syscall.h68 VOID *ShmAt(INT32 shmid, const VOID *shmaddr, INT32 shmflg);
69 INT32 ShmCtl(INT32 shmid, INT32 cmd, struct shmid_ds *buf);
/third_party/ltp/testcases/kernel/mem/hugetlb/hugeshmat/
H A Dhugeshmat02.c43 int *shmid; member
57 addr = shmat(*(tc->shmid), tc->addr, 0); in verify_hugeshmat()

Completed in 14 milliseconds

12345