taglinefilesource code
shp51ipc/shm.cstruct shmid_ds *shp;
shp54ipc/shm.cwhile ((shp = shm_segs[id]) == IPC_NOID) 
shp56ipc/shm.cif (shp == IPC_UNUSED)
shp58ipc/shm.cif (key == shp->shm_perm.key) 
shp69ipc/shm.cstruct shmid_ds *shp;
shp85ipc/shm.cshp = (struct shmid_ds *) kmalloc (sizeof (*shp), GFP_KERNEL);
shp86ipc/shm.cif (!shp) {
shp93ipc/shm.cshp->shm_pages = (ulong *) kmalloc (numpages*sizeof(ulong),GFP_KERNEL);
shp94ipc/shm.cif (!shp->shm_pages) {
shp98ipc/shm.ckfree(shp);
shp102ipc/shm.cfor (i=0; i< numpages; shp->shm_pages[i++] = 0);
shp104ipc/shm.cshp->shm_perm.key = key;
shp105ipc/shm.cshp->shm_perm.mode = (shmflg & S_IRWXUGO);
shp106ipc/shm.cshp->shm_perm.cuid = shp->shm_perm.uid = current->euid;
shp107ipc/shm.cshp->shm_perm.cgid = shp->shm_perm.gid = current->egid;
shp108ipc/shm.cshp->shm_perm.seq = shm_seq;
shp109ipc/shm.cshp->shm_segsz = size;
shp110ipc/shm.cshp->shm_cpid = current->pid;
shp111ipc/shm.cshp->attaches = NULL;
shp112ipc/shm.cshp->shm_lpid = shp->shm_nattch = 0;
shp113ipc/shm.cshp->shm_atime = shp->shm_dtime = 0;
shp114ipc/shm.cshp->shm_ctime = CURRENT_TIME;
shp115ipc/shm.cshp->shm_npages = numpages;
shp119ipc/shm.cshm_segs[id] = shp;
shp128ipc/shm.cstruct shmid_ds *shp;
shp142ipc/shm.cshp = shm_segs[id];
shp143ipc/shm.cif (shp->shm_perm.mode & SHM_DEST)
shp145ipc/shm.cif (size > shp->shm_segsz)
shp147ipc/shm.cif (ipcperms (&shp->shm_perm, shmflg))
shp149ipc/shm.creturn shp->shm_perm.seq*SHMMNI + id;
shp158ipc/shm.cstruct shmid_ds *shp;
shp162ipc/shm.cshp = shm_segs[id];
shp163ipc/shm.cif (shp == IPC_NOID || shp == IPC_UNUSED) {
shp167ipc/shm.cshp->shm_perm.seq++;     /* for shmat */
shp168ipc/shm.cnumpages = shp->shm_npages; 
shp174ipc/shm.cif (!shp->shm_pages) {
shp179ipc/shm.cif (!(page = shp->shm_pages[i]))
shp189ipc/shm.ckfree(shp->shm_pages);
shp191ipc/shm.ckfree(shp);
shp197ipc/shm.cstruct shmid_ds *shp, tbuf;
shp249ipc/shm.cerr = verify_area (VERIFY_WRITE, buf, sizeof (*shp));
shp254ipc/shm.cshp = shm_segs[shmid];
shp255ipc/shm.cif (shp == IPC_UNUSED || shp == IPC_NOID)
shp257ipc/shm.cif (ipcperms (&shp->shm_perm, S_IRUGO))
shp259ipc/shm.cid = shmid + shp->shm_perm.seq * SHMMNI; 
shp260ipc/shm.cmemcpy_tofs (buf, shp, sizeof(*shp));
shp264ipc/shm.cshp = shm_segs[id = shmid % SHMMNI];
shp265ipc/shm.cif (shp == IPC_UNUSED || shp == IPC_NOID)
shp267ipc/shm.cipcp = &shp->shm_perm;
shp294ipc/shm.cerr = verify_area (VERIFY_WRITE, buf, sizeof (*shp));
shp297ipc/shm.cmemcpy_tofs (buf, shp, sizeof(*shp));
shp300ipc/shm.cif (suser() || current->euid == shp->shm_perm.uid ||
shp301ipc/shm.ccurrent->euid == shp->shm_perm.cuid) {
shp306ipc/shm.cshp->shm_ctime = CURRENT_TIME;
shp311ipc/shm.cif (suser() || current->euid == shp->shm_perm.uid ||
shp312ipc/shm.ccurrent->euid == shp->shm_perm.cuid) {
shp313ipc/shm.cshp->shm_perm.mode |= SHM_DEST;
shp314ipc/shm.cif (shp->shm_nattch <= 0) 
shp385ipc/shm.cstruct shmid_ds *shp;
shp400ipc/shm.cshp = shm_segs[id = shmid % SHMMNI];
shp401ipc/shm.cif (shp == IPC_UNUSED || shp == IPC_NOID)
shp415ipc/shm.caddr = (addr - shp->shm_segsz) & PAGE_MASK;
shp422ipc/shm.cif ((addr > current->mm->start_stack - 16384 - PAGE_SIZE*shp->shm_npages))
shp428ipc/shm.cif (addr + shp->shm_segsz >= shmd->start && 
shp429ipc/shm.caddr + shp->shm_segsz < shmd->end)
shp433ipc/shm.cif (ipcperms(&shp->shm_perm, shmflg & SHM_RDONLY ? S_IRUGO : S_IRUGO|S_IWUGO))
shp435ipc/shm.cif (shp->shm_perm.seq != shmid / SHMMNI) 
shp441ipc/shm.cif ((shp != shm_segs[id]) || (shp->shm_perm.seq != shmid / SHMMNI)) {
shp448ipc/shm.cshmd->end = addr + shp->shm_npages * PAGE_SIZE;
shp451ipc/shm.cshp->shm_nattch++;            /* prevent destruction */
shp459ipc/shm.cif (--shp->shm_nattch <= 0 && shp->shm_perm.mode & SHM_DEST)
shp467ipc/shm.cshmd->seg_next = shp->attaches;
shp468ipc/shm.cshp->attaches = shmd;
shp469ipc/shm.cshp->shm_lpid = current->pid;
shp470ipc/shm.cshp->shm_atime = CURRENT_TIME;
shp485ipc/shm.cstruct shmid_ds *shp;
shp489ipc/shm.cshp = shm_segs[id];
shp491ipc/shm.cfor (shmdp = &shp->attaches; *shmdp; shmdp = &(*shmdp)->seg_next)
shp499ipc/shm.cunmap_page_range (shmd->start, shp->shm_segsz); /* sleeps */
shp501ipc/shm.cshp->shm_lpid = current->pid;
shp502ipc/shm.cshp->shm_dtime = CURRENT_TIME;
shp503ipc/shm.cif (--shp->shm_nattch <= 0 && shp->shm_perm.mode & SHM_DEST)
shp543ipc/shm.cstruct shmid_ds *shp;
shp567ipc/shm.cshp = shm_segs[id];
shp568ipc/shm.cif (shp == IPC_UNUSED) {
shp572ipc/shm.cshmd->seg_next = shp->attaches;
shp573ipc/shm.cshp->attaches = shmd;
shp574ipc/shm.cshp->shm_nattch++;
shp575ipc/shm.cshp->shm_atime = CURRENT_TIME;
shp576ipc/shm.cshp->shm_lpid = current->pid;
shp588ipc/shm.cstruct shmid_ds *shp;
shp596ipc/shm.cshp = shm_segs[id];
shp597ipc/shm.cif (shp == IPC_UNUSED || shp == IPC_NOID) {
shp602ipc/shm.cif (idx >= shp->shm_npages) {
shp607ipc/shm.cif (!(shp->shm_pages[idx] & PAGE_PRESENT)) {
shp613ipc/shm.cif (shp->shm_pages[idx] & PAGE_PRESENT) {
shp617ipc/shm.cif (shp->shm_pages[idx]) {
shp618ipc/shm.cread_swap_page (shp->shm_pages[idx], (char *) page);
shp619ipc/shm.cif (shp->shm_pages[idx] & PAGE_PRESENT)  {
shp623ipc/shm.cswap_free (shp->shm_pages[idx]);
shp627ipc/shm.cshp->shm_pages[idx] = page | (PAGE_SHARED | PAGE_DIRTY);
shp633ipc/shm.cpage = shp->shm_pages[idx];
shp650ipc/shm.cstruct shmid_ds *shp;
shp661ipc/shm.cshp = shm_segs[swap_id];
shp662ipc/shm.cif (shp == IPC_UNUSED || shp == IPC_NOID || shp->shm_perm.mode & SHM_LOCKED ) {
shp672ipc/shm.cif (idx  >= shp->shm_npages) { 
shp679ipc/shm.cpage = shp->shm_pages[idx];
shp690ipc/shm.cfor (shmd = shp->attaches; shmd; shmd = shmd->seg_next) {
shp727ipc/shm.cshp->shm_pages[idx] = swap_nr;