kernel - Refactor kern_mutex (mtx* functions)
authorMatthew Dillon <dillon@apollo.backplane.com>
Mon, 16 Mar 2015 01:48:15 +0000 (18:48 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Mon, 16 Mar 2015 01:48:15 +0000 (18:48 -0700)
commitd66b88f39a3fa6f69804b7329dfaccfb15642746
treea4075dcaf20cae67906a94e51944cda4e9b717e1
parentbc9fd5d6f672c2e2dd45451a4cbdb97a40bec516
kernel - Refactor kern_mutex (mtx* functions)

* Refactor kern_mutex in order to support asynchronous lock requests,
  which hammer2 is going to need.  kern_mutex already supports abortable
  locks.

* Add callback fields to the mtx_link structure.

* Use the mtx_link structure for shared locks in addition to exclusive locks,
  allowing asynchronous callbacks for shared locks and exclusive locks.

* Make the locking flags more deterministic.

* Redo the typedefs to be more like hammer2.  Typedef the structures rather
  than pointers so the typedef names can be used for structural embedding.
sys/kern/kern_mutex.c
sys/sys/mutex.h
sys/sys/mutex2.h
sys/vfs/nfs/nfs.h
sys/vfs/nfs/nfs_socket.c
sys/vfs/nfs/nfs_syscalls.c