Lines Matching defs:shm
61 #include <sys/shm.h>
446 XShmSegmentInfo shm;
463 shm.shmid = shmget(IPC_PRIVATE, height * 4*width, IPC_CREAT | 0666);
464 if (shm.shmid == -1)
467 shm.shmaddr = shmat(shm.shmid, 0, 0);
468 if (shm.shmaddr == (char *) -1)
471 shm.readOnly = False;
472 XShmAttach(dpy, &shm);
475 shm.shmaddr, &shm, width, height, 24);
502 XShmDetach(dpy, &shm);
503 shmdt(shm.shmaddr);
506 shmctl(shm.shmid, IPC_RMID, NULL);