taglinefilesource code
shp52ipc/shm.cstruct shmid_ds *shp;
shp55ipc/shm.cwhile ((shp = shm_segs[id]) == IPC_NOID) 
shp57ipc/shm.cif (shp == IPC_UNUSED)
shp59ipc/shm.cif (key == shp->shm_perm.key) 
shp70ipc/shm.cstruct shmid_ds *shp;
shp86ipc/shm.cshp = (struct shmid_ds *) kmalloc (sizeof (*shp), GFP_KERNEL);
shp87ipc/shm.cif (!shp) {
shp94ipc/shm.cshp->shm_pages = (ulong *) kmalloc (numpages*sizeof(ulong),GFP_KERNEL);
shp95ipc/shm.cif (!shp->shm_pages) {
shp99ipc/shm.ckfree(shp);
shp103ipc/shm.cfor (i=0; i< numpages; shp->shm_pages[i++] = 0);
shp105ipc/shm.cshp->shm_perm.key = key;
shp106ipc/shm.cshp->shm_perm.mode = (shmflg & S_IRWXUGO);
shp107ipc/shm.cshp->shm_perm.cuid = shp->shm_perm.uid = current->euid;
shp108ipc/shm.cshp->shm_perm.cgid = shp->shm_perm.gid = current->egid;
shp109ipc/shm.cshp->shm_perm.seq = shm_seq;
shp110ipc/shm.cshp->shm_segsz = size;
shp111ipc/shm.cshp->shm_cpid = current->pid;
shp112ipc/shm.cshp->attaches = NULL;
shp113ipc/shm.cshp->shm_lpid = shp->shm_nattch = 0;
shp114ipc/shm.cshp->shm_atime = shp->shm_dtime = 0;
shp115ipc/shm.cshp->shm_ctime = CURRENT_TIME;
shp116ipc/shm.cshp->shm_npages = numpages;
shp120ipc/shm.cshm_segs[id] = shp;
shp129ipc/shm.cstruct shmid_ds *shp;
shp143ipc/shm.cshp = shm_segs[id];
shp144ipc/shm.cif (shp->shm_perm.mode & SHM_DEST)
shp146ipc/shm.cif (size > shp->shm_segsz)
shp148ipc/shm.cif (ipcperms (&shp->shm_perm, shmflg))
shp150ipc/shm.creturn shp->shm_perm.seq*SHMMNI + id;
shp159ipc/shm.cstruct shmid_ds *shp;
shp163ipc/shm.cshp = shm_segs[id];
shp164ipc/shm.cif (shp == IPC_NOID || shp == IPC_UNUSED) {
shp168ipc/shm.cshp->shm_perm.seq++;     /* for shmat */
shp169ipc/shm.cnumpages = shp->shm_npages; 
shp175ipc/shm.cif (!shp->shm_pages) {
shp180ipc/shm.cif (!(page = shp->shm_pages[i]))
shp190ipc/shm.ckfree(shp->shm_pages);
shp192ipc/shm.ckfree(shp);
shp198ipc/shm.cstruct shmid_ds *shp, tbuf;
shp250ipc/shm.cerr = verify_area (VERIFY_WRITE, buf, sizeof (*shp));
shp255ipc/shm.cshp = shm_segs[shmid];
shp256ipc/shm.cif (shp == IPC_UNUSED || shp == IPC_NOID)
shp258ipc/shm.cif (ipcperms (&shp->shm_perm, S_IRUGO))
shp260ipc/shm.cid = shmid + shp->shm_perm.seq * SHMMNI; 
shp261ipc/shm.cmemcpy_tofs (buf, shp, sizeof(*shp));
shp265ipc/shm.cshp = shm_segs[id = shmid % SHMMNI];
shp266ipc/shm.cif (shp == IPC_UNUSED || shp == IPC_NOID)
shp268ipc/shm.cipcp = &shp->shm_perm;
shp295ipc/shm.cerr = verify_area (VERIFY_WRITE, buf, sizeof (*shp));
shp298ipc/shm.cmemcpy_tofs (buf, shp, sizeof(*shp));
shp301ipc/shm.cif (suser() || current->euid == shp->shm_perm.uid ||
shp302ipc/shm.ccurrent->euid == shp->shm_perm.cuid) {
shp307ipc/shm.cshp->shm_ctime = CURRENT_TIME;
shp312ipc/shm.cif (suser() || current->euid == shp->shm_perm.uid ||
shp313ipc/shm.ccurrent->euid == shp->shm_perm.cuid) {
shp314ipc/shm.cshp->shm_perm.mode |= SHM_DEST;
shp315ipc/shm.cif (shp->shm_nattch <= 0) 
shp430ipc/shm.cstruct shmid_ds *shp;
shp445ipc/shm.cshp = shm_segs[id = shmid % SHMMNI];
shp446ipc/shm.cif (shp == IPC_UNUSED || shp == IPC_NOID)
shp460ipc/shm.caddr = (addr - shp->shm_segsz) & PAGE_MASK;
shp467ipc/shm.cif ((addr > current->mm->start_stack - 16384 - PAGE_SIZE*shp->shm_npages))
shp473ipc/shm.cif (addr + shp->shm_segsz >= shmd->start && 
shp474ipc/shm.caddr + shp->shm_segsz < shmd->end)
shp478ipc/shm.cif (ipcperms(&shp->shm_perm, shmflg & SHM_RDONLY ? S_IRUGO : S_IRUGO|S_IWUGO))
shp480ipc/shm.cif (shp->shm_perm.seq != shmid / SHMMNI) 
shp486ipc/shm.cif ((shp != shm_segs[id]) || (shp->shm_perm.seq != shmid / SHMMNI)) {
shp493ipc/shm.cshmd->end = addr + shp->shm_npages * PAGE_SIZE;
shp501ipc/shm.cshp->shm_nattch++;            /* prevent destruction */
shp504ipc/shm.cif (--shp->shm_nattch <= 0 && shp->shm_perm.mode & SHM_DEST)
shp512ipc/shm.cshmd->seg_next = shp->attaches;
shp513ipc/shm.cshp->attaches = shmd;
shp514ipc/shm.cshp->shm_lpid = current->pid;
shp515ipc/shm.cshp->shm_atime = CURRENT_TIME;
shp530ipc/shm.cstruct shmid_ds *shp;
shp534ipc/shm.cshp = shm_segs[id];
shp536ipc/shm.cfor (shmdp = &shp->attaches; *shmdp; shmdp = &(*shmdp)->seg_next)
shp544ipc/shm.cdo_munmap(shmd->start, shp->shm_segsz);
shp546ipc/shm.cshp->shm_lpid = current->pid;
shp547ipc/shm.cshp->shm_dtime = CURRENT_TIME;
shp548ipc/shm.cif (--shp->shm_nattch <= 0 && shp->shm_perm.mode & SHM_DEST)
shp588ipc/shm.cstruct shmid_ds *shp;
shp614ipc/shm.cshp = shm_segs[id];
shp615ipc/shm.cif (shp == IPC_UNUSED) {
shp619ipc/shm.cshmd->seg_next = shp->attaches;
shp620ipc/shm.cshp->attaches = shmd;
shp621ipc/shm.cshp->shm_nattch++;
shp622ipc/shm.cshp->shm_atime = CURRENT_TIME;
shp623ipc/shm.cshp->shm_lpid = current->pid;
shp634ipc/shm.cstruct shmid_ds *shp;
shp642ipc/shm.cshp = shm_segs[id];
shp643ipc/shm.cif (shp == IPC_UNUSED || shp == IPC_NOID) {
shp648ipc/shm.cif (idx >= shp->shm_npages) {
shp653ipc/shm.cif (!(shp->shm_pages[idx] & PAGE_PRESENT)) {
shp658ipc/shm.cif (shp->shm_pages[idx] & PAGE_PRESENT) {
shp662ipc/shm.cif (shp->shm_pages[idx]) {
shp663ipc/shm.cread_swap_page (shp->shm_pages[idx], (char *) page);
shp664ipc/shm.cif (shp->shm_pages[idx] & PAGE_PRESENT)  {
shp668ipc/shm.cswap_free (shp->shm_pages[idx]);
shp672ipc/shm.cshp->shm_pages[idx] = page | (PAGE_SHARED | PAGE_DIRTY);
shp678ipc/shm.cpage = shp->shm_pages[idx];
shp694ipc/shm.cstruct shmid_ds *shp;
shp705ipc/shm.cshp = shm_segs[swap_id];
shp706ipc/shm.cif (shp == IPC_UNUSED || shp == IPC_NOID || shp->shm_perm.mode & SHM_LOCKED ) {
shp716ipc/shm.cif (idx  >= shp->shm_npages) { 
shp723ipc/shm.cpage = shp->shm_pages[idx];
shp734ipc/shm.cfor (shmd = shp->attaches; shmd; shmd = shmd->seg_next) {
shp771ipc/shm.cshp->shm_pages[idx] = swap_nr;