For correct behaviour, pthread_mutex must be initialized before use and destroyed afterwards. Add mutex initialization to DECLARE_AND_CONSTRUCT_CTRLR and add DECONSTRUCT_CTRLR to cleanup afterwards. Tested with a pthreads library that contains debugging code to check the mutex state. Signed-off-by: Nick Connolly <nick.connolly@mayadata.io> Change-Id: Id1d62e6f76548bd8e259d4d9c4d453a3218b0b1c Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6159 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> |
||
---|---|---|
.. | ||
.gitignore | ||
Makefile | ||
nvme_ctrlr_cmd_ut.c |