freebsd-nq/sys
Hans Petter Selasky 8461d581cf To support userspace audio daemons like Virtual OSS, /dev/sndstat is
made writeable by the root user. Userspace audio daemons can add or
update an entry in /dev/sndstat by doing a single system write call to
any /dev/sndstat file descriptor handle. When the audio daemon closes the
file handle or is killed the entry disappears.

While at it, cleanup the sound status code a bit:
- keep the device list sorted to avoid sorting the list every time a
  /dev/sndstat read request is made.
- factor out locking into a pair of locking macros.
- use the sound status lock to protect all per file handle states,
  when generating the output for /dev/sndstat and when removing or
  adding sound status devices. This way sndstat_acquire() and
  sndstat_release() become superfluous and can be removed.

Reviewed by:		mav @
Differential Revision:	https://reviews.freebsd.org/D5191
2016-02-09 17:09:14 +00:00
..
amd64 Redo r292484. Embed task(9) into zone, so that uz_maxaction is called 2016-02-03 23:30:17 +00:00
arm ARM: Use new ARMv6 naming conventions for cache and TLB functions 2016-02-05 14:57:41 +00:00
arm64 Use designated initialisers for the db disassembler interface to help with 2016-02-09 10:18:22 +00:00
boot Don't set the offset when loading the kernel on the arm loader.efi. The 2016-02-09 09:39:30 +00:00
bsm
cam Fix the SCSI Extended INQUIRY probe case when an error is returned 2016-02-08 22:13:08 +00:00
cddl ARM: Rename remaining ARMv4 specific function in DTrace code. 2016-02-06 11:16:15 +00:00
compat Rename P_KTHREAD struct proc p_flag to P_KPROC. 2016-02-09 16:30:16 +00:00
conf kmod.mk: Ensure ILINKS are created before building. 2016-02-08 20:58:52 +00:00
contrib ARM: Use new ARMv6 naming conventions for cache and TLB functions 2016-02-05 14:57:41 +00:00
crypto
ddb
dev To support userspace audio daemons like Virtual OSS, /dev/sndstat is 2016-02-09 17:09:14 +00:00
fs Revert r295359: 2016-02-07 15:40:01 +00:00
gdb
geom
gnu Update our copy of the Linux dts files to be in sync with Linux 4.5-rc1. We 2016-02-09 16:42:32 +00:00
i386
isa
kern Rename P_KTHREAD struct proc p_flag to P_KPROC. 2016-02-09 16:30:16 +00:00
kgssapi
libkern
mips Fix build. 2016-02-04 11:52:53 +00:00
modules
net
net80211
netgraph
netinet
netinet6
netipsec
netnatm
netpfil
netsmb
nfs
nfsclient
nfsserver
nlm
ofed
opencrypto
pc98
powerpc Fix build of powerpc FPU emulator after changes in r295132 to restore the 2016-02-04 17:43:56 +00:00
riscv Access pcpup using gp register. 2016-02-04 14:30:46 +00:00
rpc
security
sparc64 Fix build. 2016-02-04 12:06:06 +00:00
sys Rename P_KTHREAD struct proc p_flag to P_KPROC. 2016-02-09 16:30:16 +00:00
teken
tests
tools
ufs
vm Plug a vm_page leak introduced in r292373. 2016-02-05 19:35:53 +00:00
x86
xdr
xen
Makefile