1/*
2 * Copyright 2019-2022, Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 *
5 * Authors:
6 *		Augustin Cavalier <waddlesplash>
7 */
8#ifndef __NVME_PLATFORM_H__
9#define __NVME_PLATFORM_H__
10
11#include <lock.h>
12
13
14#define pthread_mutex_t				recursive_lock
15#undef PTHREAD_RECURSIVE_MUTEX_INITIALIZER
16#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER	RECURSIVE_LOCK_INITIALIZER(__FUNCTION__)
17#define pthread_mutex_init(mtx, attr) recursive_lock_init(mtx, __FUNCTION__)
18#define pthread_mutex_destroy		recursive_lock_destroy
19#define pthread_mutex_lock			recursive_lock_lock
20#define pthread_mutex_unlock		recursive_lock_unlock
21
22
23#endif /* __NVME_PLATFORM_H__ */
24