-/* $OpenBSD: kb3310.c,v 1.18 2012/10/03 21:44:51 miod Exp $ */
+/* $OpenBSD: kb3310.c,v 1.19 2013/12/24 01:11:04 dlg Exp $ */
/*
* Copyright (c) 2010 Otto Moerbeek <otto@drijf.net>
*
s = spltty();
bctrl = ykbec_read(sc, REG_BEEP_CONTROL);
- if (volume == 0 || timeout_pending(&sc->sc_bell_tmo)) {
- timeout_del(&sc->sc_bell_tmo);
+ if (timeout_del(&sc->sc_bell_tmo) || volume == 0) {
/* inline ykbec_bell_stop(arg); */
ykbec_write(sc, REG_BEEP_CONTROL, bctrl & ~BEEP_ENABLE);
}
-/* $OpenBSD: be.c,v 1.45 2013/11/27 08:56:31 mpi Exp $ */
+/* $OpenBSD: be.c,v 1.46 2013/12/24 01:11:04 dlg Exp $ */
/*
* Copyright (c) 1998 Theo de Raadt and Jason L. Wright.
int tries;
sc->sc_arpcom.ac_if.if_timer = 0;
- if (timeout_pending(&sc->sc_tick))
- timeout_del(&sc->sc_tick);
+ timeout_del(&sc->sc_tick);
tries = 32;
sc->sc_br->tx_cfg = 0;
-/* $OpenBSD: kern_synch.c,v 1.111 2013/11/25 15:24:18 tedu Exp $ */
+/* $OpenBSD: kern_synch.c,v 1.112 2013/12/24 01:11:04 dlg Exp $ */
/* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */
/*
if (p->p_flag & P_TIMEOUT) {
atomic_clearbits_int(&p->p_flag, P_TIMEOUT);
return (EWOULDBLOCK);
- } else if (timeout_pending(&p->p_sleep_to)) {
+ } else
timeout_del(&p->p_sleep_to);
- }
return (0);
}