devfs - Introduce MPSAFE read/write/ioctl support
authorAlex Hornung <ahornung@gmail.com>
Mon, 21 Dec 2009 08:22:46 +0000 (08:22 +0000)
committerAlex Hornung <ahornung@gmail.com>
Mon, 21 Dec 2009 08:31:20 +0000 (08:31 +0000)
commit3a1032a61f3ea2b7ca93c34278f5220f31a9b9a6
treead2e0a66553ff5d0d23c60f6d11d652a90b2b96b
parent1fe5fad280afd9a7d56ff23a8c30b838f79282b9
devfs - Introduce MPSAFE read/write/ioctl support

* Add D_MPSAFE_READ, D_MPSAFE_WRITE and D_MPSAFE_IOCTL defines for use
  with the dev_ops structure to mark the read,write and/or ioctl methods
  as mpsafe.

* Change devfs so that it won't acquire the mplock for
  read/writes/ioctls that are marked as MPSAFE.

* Add some statistics under sysctl vfs.devfs about the number of read
  and writes done with the mplock and without it.

* While here, MPSAFE specf_stat in devfs so it doesn't acquire the
  mplock anymore as it doesn't even need it.
sys/sys/device.h
sys/vfs/devfs/devfs_core.c
sys/vfs/devfs/devfs_vnops.c