Merge remote-tracking branch 'moduleh/module.h-split'
[linux-2.6/next.git] / drivers / tty / tty_mutex.c
blob9ff986c32a21ef702edf515a79c19440a504b747
1 #include <linux/tty.h>
2 #include <linux/module.h>
3 #include <linux/kallsyms.h>
4 #include <linux/semaphore.h>
5 #include <linux/sched.h>
7 /*
8 * The 'big tty mutex'
10 * This mutex is taken and released by tty_lock() and tty_unlock(),
11 * replacing the older big kernel lock.
12 * It can no longer be taken recursively, and does not get
13 * released implicitly while sleeping.
15 * Don't use in new code.
17 static DEFINE_MUTEX(big_tty_mutex);
20 * Getting the big tty mutex.
22 void __lockfunc tty_lock(void)
24 mutex_lock(&big_tty_mutex);
26 EXPORT_SYMBOL(tty_lock);
28 void __lockfunc tty_unlock(void)
30 mutex_unlock(&big_tty_mutex);
32 EXPORT_SYMBOL(tty_unlock);