diff options
| author | cinap_lenrek <cinap_lenrek@felloff.net> | 2018-10-27 20:00:12 +0200 |
|---|---|---|
| committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2018-10-27 20:00:12 +0200 |
| commit | 2ee4c089741823aae794eaa2eb53780f65019981 (patch) | |
| tree | a3e3df439b462a3dc3274fb038a1e0ed8dd96bf6 | |
| parent | d81f4d4866ac6084d8268880fa36bec3ece460c1 (diff) | |
| download | plan9front-2ee4c089741823aae794eaa2eb53780f65019981.tar.xz | |
devuart: don't sleep in uartdrainoutput() when called splhi or without a process
uartdrainoutput() might be called in early initialization
from uartctl() without a process.
| -rw-r--r-- | sys/src/9/port/devuart.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/src/9/port/devuart.c b/sys/src/9/port/devuart.c index 197e695f4..6cc9c46d8 100644 --- a/sys/src/9/port/devuart.c +++ b/sys/src/9/port/devuart.c @@ -318,9 +318,8 @@ uartdrained(void* arg) static void uartdrainoutput(Uart *p) { - if(!p->enabled) + if(!p->enabled || up == nil || !islo()) return; - p->drain = 1; if(waserror()){ p->drain = 0; |
