diff options
| author | Meizu OpenSource <patchwork@meizu.com> | 2016-08-15 10:19:42 +0800 |
|---|---|---|
| committer | Meizu OpenSource <patchwork@meizu.com> | 2016-08-15 10:19:42 +0800 |
| commit | d2e1446d81725c351dc73a03b397ce043fb18452 (patch) | |
| tree | 4dbc616b7f92aea39cd697a9084205ddb805e344 /include/linux/mt_export.h | |
first commit
Diffstat (limited to 'include/linux/mt_export.h')
| -rw-r--r-- | include/linux/mt_export.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/linux/mt_export.h b/include/linux/mt_export.h new file mode 100644 index 000000000..86e989f08 --- /dev/null +++ b/include/linux/mt_export.h @@ -0,0 +1,27 @@ +#include <linux/mutex.h> +#include <linux/semaphore.h> + +/*mutex*/ +extern struct mutex *mt_mutex_init(void); +extern void mt_mutex_lock_nested(struct mutex *lock, unsigned int subclass); +extern void mt_mutex_lock_nest_lock(struct mutex *lock, struct rw_semaphore *nest_lock); +extern int mt_mutex_lock_interruptible_nested(struct mutex *lock, unsigned int subclass); + +extern int mt_mutex_lock_killable_nested(struct mutex *lock, unsigned int subclass); +extern void mt_mutex_lock(struct mutex *lock); +extern int mt_mutex_lock_interruptible(struct mutex *lock); +extern int mt_mutex_lock_killable(struct mutex *lock); + +extern int mt_mutex_trylock(struct mutex *lock); +extern void mt_mutex_unlock(struct mutex *lock); +extern int mt_atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock); + + +/* semaphore */ +extern struct semaphore *mt_sema_init(int val); +extern void mt_down(struct semaphore *sem); +extern int mt_down_interruptible(struct semaphore *sem); +extern int mt_down_killable(struct semaphore *sem); +extern int mt_down_trylock(struct semaphore *sem); +extern int mt_down_timeout(struct semaphore *sem, long jiffies); +extern void mt_up(struct semaphore *sem); |
