add make CONF=pthread for modern systems

This commit is contained in:
Russ Cox
2008-12-09 07:05:09 +00:00
parent 189f67ae9b
commit 4f14409f56
11 changed files with 590 additions and 3 deletions

View File

@ -14,6 +14,7 @@ Queue* lineq; /* processed console input */
Queue* serialoq; /* serial console output */
Queue* kprintoq; /* console output, for /dev/kprint */
long kprintinuse; /* test and set whether /dev/kprint is open */
Lock kprintlock;
int iprintscreenputs = 0;
int panicking;
@ -584,10 +585,14 @@ consopen(Chan *c, int omode)
break;
case Qkprint:
if(tas(&kprintinuse) != 0){
lock(&kprintlock);
if(kprintinuse != 0){
c->flag &= ~COPEN;
unlock(&kprintlock);
error(Einuse);
}
kprintinuse = 1;
unlock(&kprintlock);
if(kprintoq == nil){
kprintoq = qopen(8*1024, Qcoalesce, 0, 0);
if(kprintoq == nil){