summaryrefslogtreecommitdiffstats
path: root/include/lock.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/lock.h')
-rw-r--r--include/lock.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/lock.h b/include/lock.h
new file mode 100644
index 0000000..412aabf
--- /dev/null
+++ b/include/lock.h
@@ -0,0 +1,20 @@
+#ifndef _JOVE_LOCK_H
+#define _JOVE_LOCK_H 1
+
+void _mtx_acquire(unsigned char *mtx);
+void _mtx_release(unsigned char *mtx);
+
+#ifdef DBG_LOCK
+#include "print.h"
+#define mtx_acquire(mtx) \
+ klogf("Lock %p\n", mtx); \
+ _mtx_acquire(mtx)
+#define mtx_release(mtx) \
+ klogf("Release %p\n", mtx); \
+ _mtx_release(mtx)
+#else
+#define mtx_acquire(mtx) _mtx_acquire(mtx)
+#define mtx_release(mtx) _mtx_release(mtx)
+#endif
+
+#endif