Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/changes/2005/1208/1

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


Lock consistently.  Other cleanups.
 [jmk] --rw-rw-r-- M 960117 glenda sys 11218 Dec  8 06:55 sys/src/9/ip/arp.c
	/n/sourcesdump/2005/1208/plan9/sys/src/9/ip/arp.c:598,620 - 
	/n/sourcesdump/2005/1209/plan9/sys/src/9/ip/arp.c:598,612
	  		else
	  			break;
	  	}
	+ 	if(a == nil)
	+ 		goto dodrops;
	  
	- 	 /* need to unlock arp, else will deadlock when icmpns 
	- 	  * wants to lock arp later.
	- 	  */
	- 	
	- 	qunlock(arp);
	  
	- 	if(a == nil) 
	- 		goto dodrops; 		// return 0;
	- 
	+ 	qunlock(arp);	/* for icmpns */
	  	if((sflag = ipv6anylocal(ifc, ipsrc)) != SRC_UNSPEC) 
	  		icmpns(f, ipsrc, sflag, a->ip, TARG_MULTI, ifc->mac); 
	  
	  	runlock(ifc);
	- 
	- 	/* grab lock on arp again */
	- 
	  	qlock(arp);	
	  
	  	/* put to the end of re-transmit chain */
 [jmk] --rw-rw-r-- M 960117 jmk sys 29166 Dec  8 06:52 sys/src/9/pc/etherdp83820.c
	/n/sourcesdump/2005/1208/plan9/sys/src/9/pc/etherdp83820.c:1056,1061 - 
	/n/sourcesdump/2005/1209/plan9/sys/src/9/pc/etherdp83820.c:1056,1063
	  		delay(1);
	  
	  	atc93c46r(ctlr, 0);
	+ 	if(ctlr->eeprom == nil)
	+ 		return -1;
	  	sum = 0;
	  	for(i = 0; i < 0x0E; i++){
	  		r = atc93c46r(ctlr, i);
 [jmk] --rw-rw-r-- M 960117 glenda sys 1425 Dec  8 06:55 sys/src/9/port/alarm.c
	/n/sourcesdump/2005/1208/plan9/sys/src/9/port/alarm.c:4,12 - 
	/n/sourcesdump/2005/1209/plan9/sys/src/9/port/alarm.c:4,11
	  #include	"dat.h"
	  #include	"fns.h"
	  
	- Alarms	alarms;
	- Rendez	alarmr;
	- Talarm	talarm;
	+ static Alarms	alarms;
	+ static Rendez	alarmr;
	  
	  void
	  alarmkproc(void*)
 [jmk] --rw-rw-r-- M 960117 glenda sys 22558 Dec  8 06:55 sys/src/9/port/portdat.h
	/n/sourcesdump/2005/1208/plan9/sys/src/9/port/portdat.h:40,46 - 
	/n/sourcesdump/2005/1209/plan9/sys/src/9/port/portdat.h:40,45
	  typedef struct Sargs	Sargs;
	  typedef struct Schedq	Schedq;
	  typedef struct Segment	Segment;
	- typedef struct Talarm	Talarm;
	  typedef struct Timer	Timer;
	  typedef struct Timers	Timers;
	  typedef struct Uart	Uart;
	/n/sourcesdump/2005/1208/plan9/sys/src/9/port/portdat.h:89,100 - 
	/n/sourcesdump/2005/1209/plan9/sys/src/9/port/portdat.h:88,93
	  	int	writer;		/* number of writers */
	  };
	  
	- struct Talarm
	- {
	- 	Lock;
	- 	Proc	*list;
	- };
	- 
	  struct Alarms
	  {
	  	QLock;
	/n/sourcesdump/2005/1208/plan9/sys/src/9/port/portdat.h:363,369 - 
	/n/sourcesdump/2005/1209/plan9/sys/src/9/port/portdat.h:356,361
	  	Page	*pages[PTEPERTAB];	/* Page map for this chunk of pte */
	  	Page	**first;		/* First used entry */
	  	Page	**last;			/* Last used entry */
	- 	Pte	*next;			/* Free list */
	  };
	  
	  /* Segment types */
	/n/sourcesdump/2005/1208/plan9/sys/src/9/port/portdat.h:416,422 - 
	/n/sourcesdump/2005/1209/plan9/sys/src/9/port/portdat.h:408,414
	  	Pte	**map;
	  	int	mapsize;
	  	Pte	*ssegmap[SSEGMAPSIZE];
	- 	ulong	mark;	/* portcountrefs */
	+ 	ulong	mark;		/* portcountrefs */
	  };
	  
	  enum
	/n/sourcesdump/2005/1208/plan9/sys/src/9/port/portdat.h:599,606 - 
	/n/sourcesdump/2005/1209/plan9/sys/src/9/port/portdat.h:591,596
	  	PriRoot		= 13,		/* base priority for root processes */
	  };
	  
	- typedef uvlong	Ticks;
	- 
	  struct Schedq
	  {
	  	Lock;
	/n/sourcesdump/2005/1208/plan9/sys/src/9/port/portdat.h:768,774 - 
	/n/sourcesdump/2005/1209/plan9/sys/src/9/port/portdat.h:758,763
	  extern	char*	statename[];
	  extern	Image	swapimage;
	  extern	char*	sysname;
	- extern	Talarm	talarm;
	  extern	uint	qiomaxatomic;
	  
	  enum
 [jmk] --rw-rw-r-- M 960117 glenda sys 22178 Dec  8 06:55 sys/src/9/port/sysfile.c
	/n/sourcesdump/2005/1208/plan9/sys/src/9/port/sysfile.c:582,588 - 
	/n/sourcesdump/2005/1209/plan9/sys/src/9/port/sysfile.c:582,588
	  			l = devtab[nc->type]->stat(nc, buf, nbuf);
	  			l = dirsetname(name, nname, buf, l, nbuf);
	  			if(l == BIT16SZ)
	- 				goto Norewrite;
	+ 				error("dirsetname");
	  			poperror();
	  
	  			/*
 [jmk] --rw-rw-r-- M 960117 glenda sys 15146 Dec  8 06:56 sys/src/9/port/sysproc.c
	/n/sourcesdump/2005/1208/plan9/sys/src/9/port/sysproc.c:568,575 - 
	/n/sourcesdump/2005/1209/plan9/sys/src/9/port/sysproc.c:568,575
	  				buf[ERRMAX-1] = 0;
	  				status = buf;
	  			}
	+ 			poperror();
	  		}
	- 		poperror();
	  
	  	}
	  	pexit(status, 1);


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.