diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-08-12 13:24:29 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-08-12 23:29:30 +0200 |
commit | dd2ffd2ed67f2a867f62d30b8ff38516a80ea8e6 (patch) | |
tree | 468336428c4f9fc1a2c2b5cfa41a7d98e464621e /xen | |
parent | 34890b4939c1ee8190a103b8693e94ddffe13ffa (diff) | |
download | gnumach-dd2ffd2ed67f2a867f62d30b8ff38516a80ea8e6.tar.gz gnumach-dd2ffd2ed67f2a867f62d30b8ff38516a80ea8e6.tar.bz2 gnumach-dd2ffd2ed67f2a867f62d30b8ff38516a80ea8e6.zip |
tty: Convert t_lock to using simple_lock_irq
Diffstat (limited to 'xen')
-rw-r--r-- | xen/console.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/xen/console.c b/xen/console.c index 61de4390..fd3cf5dd 100644 --- a/xen/console.c +++ b/xen/console.c @@ -184,32 +184,29 @@ int hypcnopen(dev_t dev, int flag, io_req_t ior) struct tty *tp = &hypcn_tty; spl_t o_pri; - o_pri = spltty(); - simple_lock(&tp->t_lock); + o_pri = simple_lock_irq(&tp->t_lock); if (!(tp->t_state & (TS_ISOPEN|TS_WOPEN))) { /* XXX ttychars allocates memory */ - simple_unlock(&tp->t_lock); + simple_unlock_nocheck(&tp->t_lock.slock); ttychars(tp); - simple_lock(&tp->t_lock); + simple_lock_nocheck(&tp->t_lock.slock); tp->t_oproc = hypcnstart; tp->t_stop = hypcnstop; tp->t_ospeed = tp->t_ispeed = B9600; tp->t_flags = ODDP|EVENP|ECHO|CRMOD|XTABS; } tp->t_state |= TS_CARR_ON; - simple_unlock(&tp->t_lock); - splx(o_pri); + simple_unlock_irq(o_pri, &tp->t_lock); return (char_open(dev, tp, flag, ior)); } void hypcnclose(dev_t dev, int flag) { struct tty *tp = &hypcn_tty; - spl_t s = spltty(); - simple_lock(&tp->t_lock); + spl_t s; + s = simple_lock_irq(&tp->t_lock); ttyclose(tp); - simple_unlock(&tp->t_lock); - splx(s); + simple_unlock_irq(s, &tp->t_lock); } int hypcnprobe(struct consdev *cp) |