Skip to content

Commit

Permalink
Add linux/mutex.h
Browse files Browse the repository at this point in the history
  • Loading branch information
thezealousfool committed Jun 20, 2017
1 parent 9026ac8 commit 1886cb7
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions headers/compatibility/linuxkpi/linux/mutex.h
@@ -0,0 +1,21 @@
#ifndef _LINUX_MUTEX_H_
#define _LINUX_MUTEX_H_

#include <lock.h>

typedef mutex mutex_t;

#define mutex_lock_nested(_m, _s) mutex_lock((_m))
#define mutex_lock_nest_lock(_m, _s) mutex_lock((_m))

#define mutex_init(_m) \
mutex_init((_m), mutex_name(#_m))

#define linux_mutex_init(m, name, flags) \
mutex_init_etc((m), (name), (flags))


#define linux_mutex_destroy(m) \
mutex_destroy((m))

#endif /* _LINUX_MUTEX_H_ */

0 comments on commit 1886cb7

Please sign in to comment.