Lines Matching refs:descriptor
73 UnmapViewOfFile(ptr->descriptor); in tsrm_win32_dtor()
404 if (!ptr->descriptor) { in shm_get()
407 if (!addr && ptr->descriptor->shm_perm.key == key) { in shm_get()
648 if (size == 0 || size > SIZE_MAX - sizeof(shm->descriptor)) { in shmget()
651 size += sizeof(shm->descriptor); in shmget()
677 if (ptr->descriptor && ptr->descriptor->shm_perm.key == key) { in shmget()
691 shm->descriptor = MapViewOfFileEx(shm->segment, FILE_MAP_ALL_ACCESS, 0, 0, 0, NULL); in shmget()
693 if (NULL != shm->descriptor && created) { in shmget()
694 shm->descriptor->shm_perm.key = key; in shmget()
695 shm->descriptor->shm_segsz = size; in shmget()
696 shm->descriptor->shm_ctime = time(NULL); in shmget()
697 shm->descriptor->shm_cpid = getpid(); in shmget()
698 shm->descriptor->shm_perm.mode = flags; in shmget()
700 shm->descriptor->shm_perm.cuid = shm->descriptor->shm_perm.cgid= 0; in shmget()
701 shm->descriptor->shm_perm.gid = shm->descriptor->shm_perm.uid = 0; in shmget()
702 shm->descriptor->shm_atime = shm->descriptor->shm_dtime = 0; in shmget()
703 shm->descriptor->shm_lpid = shm->descriptor->shm_nattch = 0; in shmget()
704 shm->descriptor->shm_perm.mode = shm->descriptor->shm_perm.seq = 0; in shmget()
707 …if (NULL != shm->descriptor && (shm->descriptor->shm_perm.key != key || size > shm->descriptor->sh… in shmget()
712 UnmapViewOfFile(shm->descriptor); in shmget()
713 shm->descriptor = NULL; in shmget()
728 shm->addr = shm->descriptor + sizeof(shm->descriptor); in shmat()
729 shm->descriptor->shm_atime = time(NULL); in shmat()
730 shm->descriptor->shm_lpid = getpid(); in shmat()
731 shm->descriptor->shm_nattch++; in shmat()
745 shm->descriptor->shm_dtime = time(NULL); in shmdt()
746 shm->descriptor->shm_lpid = getpid(); in shmdt()
747 shm->descriptor->shm_nattch--; in shmdt()
750 if (shm->descriptor->shm_nattch <= 0) { in shmdt()
751 ret = UnmapViewOfFile(shm->descriptor) ? 0 : -1; in shmdt()
752 shm->descriptor = NULL; in shmdt()
767 memcpy(buf, shm->descriptor, sizeof(struct shmid_ds)); in shmctl()
771 shm->descriptor->shm_ctime = time(NULL); in shmctl()
772 shm->descriptor->shm_perm.uid = buf->shm_perm.uid; in shmctl()
773 shm->descriptor->shm_perm.gid = buf->shm_perm.gid; in shmctl()
774 shm->descriptor->shm_perm.mode = buf->shm_perm.mode; in shmctl()
778 if (shm->descriptor->shm_nattch < 1) { in shmctl()
779 shm->descriptor->shm_perm.key = -1; in shmctl()