pshared: Add mutex_init_pshared_with_type()
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Thu, 28 May 2020 12:56:41 +0000 (21:56 +0900)
committerJens Axboe <axboe@kernel.dk>
Thu, 28 May 2020 16:35:44 +0000 (10:35 -0600)
commit3ed6894b00c4929896ff169778cf05752e2ed825
tree9fe88c70c68df40dadc2cbd0b4a902bcd476456b
parentc96b385b6e0c78478697713e6da9174fba2432d3
pshared: Add mutex_init_pshared_with_type()

To initialize mutex to be shared across processes, the helper function
mutex_init_pshared() is available. However, it does not allow to set
mutex attribute types such as POSIX_MUTEX_RECURSIVE.

To allow setting mutex attribute types, introduce another helper function
mutex_init_pshared_with_type(). It initialize mutex for sharing across
processes and set attribute types specified as its argument.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
pshared.c
pshared.h