OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
CVS: cvs.openbsd.org: src

From: Alexandre Ratchov (ratchovcvs.openbsd.org)
Date: Wed May 15 2013 - 03:29:26 CDT


CVSROOT: /cvs
Module name: src
Changes by: ratchovcvs.openbsd.org 2013/05/15 02:29:26

Modified files:
        sys/arch/hppa/gsc: harmony.c
        sys/arch/macppc/dev: awacs.c i2s.c
        sys/arch/sgi/dev: mavb.c
        sys/arch/sparc/dev: audioamd.c cs4231.c
        sys/arch/sparc64/dev: ce4231.c
        sys/arch/vax/vsa: vsaudio.c
        sys/arch/zaurus/dev: zaurus_audio.c
        sys/dev : audio.c audio_if.h midi.c
        sys/dev/bluetooth: btsco.c
        sys/dev/ic : am7930.c arcofi.c
        sys/dev/isa : ad1848.c ess.c gus.c ics2101.c mpu401.c sbdsp.c
                         wss.c
        sys/dev/pci : auacer.c auglx.c auich.c auixp.c autri.c
                         auvia.c azalia.c cmpci.c cs4280.c cs4281.c
                         eap.c emuxki.c envy.c esa.c eso.c fms.c
                         maestro.c neo.c sv.c yds.c
        sys/dev/sbus : cs4231.c
        sys/dev/tc : bba.c
        sys/dev/usb : uaudio.c umidi.c

Log message:
Introduce a global interrupt-aware mutex protecting data
structures (including sound-card registers) from concurent
access by syscall and interrupt code-paths. Since critical
sections remain the same, calls to splraise/spllower can be
safely replaced by calls to mtx_enter/mtx_leave with two
exceptions: (1) mutexes are not reentrant (the inner splraise
is thus removed), and (2) we're not allowed to sleep with a
mutex (either msleep is used or the mutex is released before
sleeping).

ok and help from kettenis, a lot of work from armani