diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-04-29 21:05:44 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-04-29 21:05:44 +0000 |
commit | 628c2951dfded4d4ff182e48960888ef3991b5c4 (patch) | |
tree | d9284923257df863bb866697e7e7899d77244de2 /sys/arch/hppa/dev/pdc.c | |
parent | 9ba43d0219ee09a42fe829d3a6e61ae0d4625f95 (diff) |
raise spl around pdc calling
Diffstat (limited to 'sys/arch/hppa/dev/pdc.c')
-rw-r--r-- | sys/arch/hppa/dev/pdc.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/arch/hppa/dev/pdc.c b/sys/arch/hppa/dev/pdc.c index 301e27d40be..38f8b79c3f7 100644 --- a/sys/arch/hppa/dev/pdc.c +++ b/sys/arch/hppa/dev/pdc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pdc.c,v 1.13 2001/01/22 22:57:31 mickey Exp $ */ +/* $OpenBSD: pdc.c,v 1.14 2001/04/29 21:05:43 mickey Exp $ */ /* * Copyright (c) 1998-2001 Michael Shalayeff @@ -368,12 +368,14 @@ pdccnlookc(dev, cp) int *cp; { int err, l; + int s = splhigh(); err = pdc_call(pdc_kbdiodc, 0, pz_kbd->pz_hpa, IODC_IO_CONSIN, pz_kbd->pz_spa, pz_kbd->pz_layers, pdcret, 0, pdc_consbuf, 1, 0); l = pdcret[0]; *cp = pdc_consbuf[0]; + splx(s); #ifdef DEBUG if (err < 0) printf("pdccnlookc: input error: %d\n", err); @@ -403,16 +405,18 @@ pdccnputc(dev, c) int c; { register int err; + int s = splhigh(); *pdc_consbuf = c; - if ((err = pdc_call(pdc_cniodc, 0, pz_cons->pz_hpa, IODC_IO_CONSOUT, - pz_cons->pz_spa, pz_cons->pz_layers, - pdcret, 0, pdc_consbuf, 1, 0)) < 0) { + err = pdc_call(pdc_cniodc, 0, pz_cons->pz_hpa, IODC_IO_CONSOUT, + pz_cons->pz_spa, pz_cons->pz_layers, pdcret, 0, pdc_consbuf, 1, 0); + splx(s); + + if (err < 0) { #ifdef DEBUG printf("pdccnputc: output error: %d\n", err); #endif } - } void |