#ifndef _NVME_IOCTL_UTIL_H
#define _NVME_IOCTL_UTIL_H
#include <stdint.h>
#include <sys/stdbool.h>
#include <sys/nvme.h>
#include <thread.h>
#ifdef __cplusplus
extern "C" {
#endif
#define NVME_TEST_DEV_ENVVAR "NVME_TEST_DEVICE"
extern const nvme_ioctl_lock_t nvme_test_ctrl_wrlock;
extern const nvme_ioctl_lock_t nvme_test_ctrl_rdlock;
extern const nvme_ioctl_lock_t nvme_test_ns_wrlock;
extern const nvme_ioctl_lock_t nvme_test_ns_rdlock;
extern const nvme_ioctl_unlock_t nvme_test_ctrl_unlock;
extern const nvme_ioctl_unlock_t nvme_test_ns_unlock;
extern int nvme_ioctl_test_get_fd(uint32_t);
extern int nvme_ioctl_test_get_fd_flags(uint32_t, int);
extern void nvme_ioctl_test_lock(int, const nvme_ioctl_lock_t *);
extern bool nvme_ioctl_test_thr_blocked(thread_t);
extern const char *nvme_ioctl_test_cmdstr(int);
#ifdef __cplusplus
}
#endif
#endif