1 #include <linux/mutex.h>
2 #include <linux/semaphore.h>
5 extern struct mutex
*mt_mutex_init(void);
6 extern void mt_mutex_lock_nested(struct mutex
*lock
, unsigned int subclass
);
7 extern void mt_mutex_lock_nest_lock(struct mutex
*lock
, struct rw_semaphore
*nest_lock
);
8 extern int mt_mutex_lock_interruptible_nested(struct mutex
*lock
, unsigned int subclass
);
10 extern int mt_mutex_lock_killable_nested(struct mutex
*lock
, unsigned int subclass
);
11 extern void mt_mutex_lock(struct mutex
*lock
);
12 extern int mt_mutex_lock_interruptible(struct mutex
*lock
);
13 extern int mt_mutex_lock_killable(struct mutex
*lock
);
15 extern int mt_mutex_trylock(struct mutex
*lock
);
16 extern void mt_mutex_unlock(struct mutex
*lock
);
17 extern int mt_atomic_dec_and_mutex_lock(atomic_t
*cnt
, struct mutex
*lock
);
21 extern struct semaphore
*mt_sema_init(int val
);
22 extern void mt_down(struct semaphore
*sem
);
23 extern int mt_down_interruptible(struct semaphore
*sem
);
24 extern int mt_down_killable(struct semaphore
*sem
);
25 extern int mt_down_trylock(struct semaphore
*sem
);
26 extern int mt_down_timeout(struct semaphore
*sem
, long jiffies
);
27 extern void mt_up(struct semaphore
*sem
);