Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[deliverable/linux.git] / drivers / tty / tty_mutex.c
CommitLineData
b07471fa
AB
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>
6
f309532b
LT
7/*
8 * The 'big tty mutex'
9 *
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.
14 *
15 * Don't use in new code.
16 */
17static DEFINE_MUTEX(big_tty_mutex);
fde86d31 18
b07471fa
AB
19/*
20 * Getting the big tty mutex.
21 */
f309532b 22void __lockfunc tty_lock(void)
b07471fa 23{
f309532b 24 mutex_lock(&big_tty_mutex);
b07471fa
AB
25}
26EXPORT_SYMBOL(tty_lock);
27
f309532b 28void __lockfunc tty_unlock(void)
b07471fa 29{
f309532b 30 mutex_unlock(&big_tty_mutex);
b07471fa
AB
31}
32EXPORT_SYMBOL(tty_unlock);
This page took 0.224508 seconds and 5 git commands to generate.