plan 9 kernel history: overview | file list | diff list

1992/1104/port/segment.c (diff list | history)

1992/0912/sys/src/9/port/segment.c:103,1151992/1104/sys/src/9/port/segment.c:103,117 (short | long | prev | next)
1991/0705    
} 
 
Segment* 
1992/0430    
dupseg(Segment *s, int share) 
1992/1104    
dupseg(Segment **seg, int segno, int share) 
1991/0705    
{ 
1992/0824    
	int i; 
1991/0705    
	Pte *pte; 
	Segment *n; 
1992/1104    
	Segment *n, *s; 
1991/0705    
 
1992/0824    
	SET(n); 
1992/1104    
	s = seg[segno]; 
 
1991/0705    
	switch(s->type&SG_TYPE) { 
1991/0706    
	case SG_TEXT:			/* New segment shares pte set */ 
1991/0705    
	case SG_SHARED: 
1992/0912/sys/src/9/port/segment.c:135,1401992/1104/sys/src/9/port/segment.c:137,145
1992/0824    
		break; 
1992/0430    
 
1991/0706    
	case SG_DATA:			/* Copy on write plus demand load info */ 
1992/1104    
		if(segno == TSEG) 
			return data2txt(s); 
 
1991/0706    
		qlock(&s->lk); 
1992/0430    
		if(share && s->ref == 1) { 
			s->type = (s->type&~SG_TYPE)|SG_SHDATA; 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)