Lines Matching full:ds
95 struct shmid_ds ds; member
135 g_shmSegs[i].ds.shm_perm.seq = i + 1; in ShmInit()
230 seg->ds.shm_perm.mode = (UINT32)shmflg & ACCESSPERMS; in ShmAllocSeg()
231 seg->ds.shm_perm.key = key; in ShmAllocSeg()
232 seg->ds.shm_segsz = size; in ShmAllocSeg()
233 seg->ds.shm_perm.cuid = LOS_GetUserID(); in ShmAllocSeg()
234 seg->ds.shm_perm.uid = LOS_GetUserID(); in ShmAllocSeg()
235 seg->ds.shm_perm.cgid = LOS_GetGroupID(); in ShmAllocSeg()
236 seg->ds.shm_perm.gid = LOS_GetGroupID(); in ShmAllocSeg()
237 seg->ds.shm_lpid = 0; in ShmAllocSeg()
238 seg->ds.shm_nattch = 0; in ShmAllocSeg()
239 seg->ds.shm_cpid = LOS_GetCurrProcessID(); in ShmAllocSeg()
240 seg->ds.shm_atime = 0; in ShmAllocSeg()
241 seg->ds.shm_dtime = 0; in ShmAllocSeg()
242 seg->ds.shm_ctime = time(NULL); in ShmAllocSeg()
256 if (count != (seg->ds.shm_segsz >> PAGE_SHIFT)) { in ShmFreeSeg()
257 …VM_ERR("free physical pages failed, count = %d, size = %d", count, seg->ds.shm_segsz >> PAGE_SHIFT… in ShmFreeSeg()
260 g_shmUsedPageCount -= seg->ds.shm_segsz >> PAGE_SHIFT; in ShmFreeSeg()
273 (seg->ds.shm_perm.key == key)) { in ShmFindSegByKey()
285 if (size > seg->ds.shm_segsz) { in ShmSegValidCheck()
307 …if ((seg->status & SHM_SEG_FREE) || ((seg->ds.shm_nattch == 0) && (seg->status & SHM_SEG_REMOVE)))… in ShmFindSeg()
348 seg->ds.shm_nattch++; in OsShmFork()
365 seg->ds.shm_nattch--; in OsShmRegionFree()
366 if (seg->ds.shm_nattch <= 0 && (seg->status & SHM_SEG_REMOVE)) { in OsShmRegionFree()
369 seg->ds.shm_dtime = time(NULL); in OsShmRegionFree()
370 seg->ds.shm_lpid = LOS_GetCurrProcessID(); /* may not be the space's PID. */ in OsShmRegionFree()
399 mode_t privMode = seg->ds.shm_perm.mode; in ShmPermCheck()
402 if ((uid == seg->ds.shm_perm.uid) || (uid == seg->ds.shm_perm.cuid)) { in ShmPermCheck()
405 } else if (LOS_CheckInGroups(seg->ds.shm_perm.gid) || in ShmPermCheck()
406 LOS_CheckInGroups(seg->ds.shm_perm.cgid)) { in ShmPermCheck()
517 region = LOS_RegionAlloc(space, 0, seg->ds.shm_segsz, regionFlags, 0); in ShmatVmmAlloc()
525 LOS_RegionFind(space, vaddr + seg->ds.shm_segsz - 1) || in ShmatVmmAlloc()
526 LOS_RegionRangeFind(space, vaddr, seg->ds.shm_segsz - 1))) { in ShmatVmmAlloc()
530 vaddr = (VADDR_T)LOS_MMap(vaddr, seg->ds.shm_segsz, prot, mapFlags, -1, 0); in ShmatVmmAlloc()
581 seg->ds.shm_nattch++; in ShmAt()
584 seg->ds.shm_nattch--; in ShmAt()
591 seg->ds.shm_atime = time(NULL); in ShmAt()
592 seg->ds.shm_lpid = LOS_GetCurrProcessID(); in ShmAt()
635 ret = LOS_ArchCopyToUser(buf, &seg->ds, sizeof(struct shmid_ds)); in ShmCtl()
641 …ret = (unsigned int)((unsigned int)seg->ds.shm_perm.seq << 16) | (unsigned int)((unsigned int)shmi… in ShmCtl()
656 seg->ds.shm_perm.uid = shm_perm.uid; in ShmCtl()
657 seg->ds.shm_perm.gid = shm_perm.gid; in ShmCtl()
658 seg->ds.shm_perm.mode = (seg->ds.shm_perm.mode & ~ACCESSPERMS) | in ShmCtl()
660 seg->ds.shm_ctime = time(NULL); in ShmCtl()
674 if (seg->ds.shm_nattch <= 0) { in ShmCtl()
758 seg->ds.shm_nattch--; in ShmDt()
759 if ((seg->ds.shm_nattch <= 0) && in ShmDt()
763 seg->ds.shm_dtime = time(NULL); in ShmDt()
764 seg->ds.shm_lpid = LOS_GetCurrProcessID(); in ShmDt()
792 PRINTK("%08x %-8d %-10o %-10u %-10u %-10x %s\n", seg->ds.shm_perm.key, in OsShmInfoCmd()
793 i, seg->ds.shm_perm.mode, seg->ds.shm_segsz, seg->ds.shm_nattch, in OsShmInfoCmd()
816 if (seg->ds.shm_nattch <= 0) { in OsShmDeleteCmd()