Lines Matching defs:shm
53 #include <sys/shm.h>
441 XShmSegmentInfo shm;
455 shm.shmid = shmget(IPC_PRIVATE, height * 4*width, IPC_CREAT | 0666);
456 if (shm.shmid == -1)
459 shm.shmaddr = shmat(shm.shmid, 0, 0);
460 if (shm.shmaddr == (char *) -1) {
461 shmctl(shm.shmid, IPC_RMID, NULL);
465 shm.readOnly = False;
466 XShmAttach(dpy, &shm);
469 shm.shmaddr, &shm, width, height, 24);
471 shmctl(shm.shmid, IPC_RMID, NULL);
474 XShmDetach(dpy, &shm);
475 shmdt(shm.shmaddr);
500 ptr = (uint32_t *)shm.shmaddr;
526 XShmDetach(dpy, &shm);
527 shmdt(shm.shmaddr);