For correct behaviour, pthread_mutex must be initialized before use and destroyed afterwards. An already initialized mutex should not be re-initialized. Remove the call to mutex_init from setup_qpairs since it will be done in nvme_ctrlr_construct. Add calls to nvme_ctrlr_construct where nvme_ctrlr_destruct is called without a matching construct. Add missing calls to mutex_init and mutex_destroy as required. 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: I0ee97a70d67157668cd8921fbee03d976d4d607d Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6161 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: Ben Walker <benjamin.walker@intel.com> |
||
---|---|---|
.. | ||
.gitignore | ||
Makefile | ||
nvme_ctrlr_ut.c |