summaryrefslogtreecommitdiffstats
path: root/include/lock.h
blob: 412aabf34bd2b7ab5148259d20c98d0386aa100e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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