int segnum;
int segnum, result;
shm_delete_mapping(vm, shmmap_s)	struct vmspace *vm;	struct shmmap_state *shmmap_s;{	struct shmid_ds *shmseg;	int segnum;	size_t size;		segnum = IPCID_TO_IX(shmmap_s->shmid);	shmseg = &shmsegs[segnum];	size = round_page(shmseg->shm_segsz);	uvm_deallocate(&vm->vm_map, shmmap_s->va, size);	shmmap_s->shmid = -1;	shmseg->shm_dtime = time.tv_sec;	if ((--shmseg->shm_nattch <= 0) &&	    (shmseg->shm_perm.mode & SHMSEG_REMOVED)) {		shm_deallocate_segment(shmseg);		shm_last_free = segnum;	}	return 0;}