add make CONF=pthread for modern systems
This commit is contained in:
@ -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){
|
||||
|
Reference in New Issue
Block a user