Release 4.12 drivers/tty/tty_mutex.c
  
  
  
#include <linux/tty.h>
#include <linux/module.h>
#include <linux/kallsyms.h>
#include <linux/semaphore.h>
#include <linux/sched.h>
/* Legacy tty mutex glue */
/*
 * Getting the big tty mutex.
 */
void tty_lock(struct tty_struct *tty)
{
	if (WARN(tty->magic != TTY_MAGIC, "L Bad %p\n", tty))
		return;
	tty_kref_get(tty);
	mutex_lock(&tty->legacy_mutex);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Alan Cox | 33 | 84.62% | 3 | 60.00% | 
| Peter Hurley | 6 | 15.38% | 2 | 40.00% | 
| Total | 39 | 100.00% | 5 | 100.00% | 
EXPORT_SYMBOL(tty_lock);
int tty_lock_interruptible(struct tty_struct *tty)
{
	int ret;
	if (WARN(tty->magic != TTY_MAGIC, "L Bad %p\n", tty))
		return -EIO;
	tty_kref_get(tty);
	ret = mutex_lock_interruptible(&tty->legacy_mutex);
	if (ret)
		tty_kref_put(tty);
	return ret;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Peter Hurley | 59 | 100.00% | 2 | 100.00% | 
| Total | 59 | 100.00% | 2 | 100.00% | 
void tty_unlock(struct tty_struct *tty)
{
	if (WARN(tty->magic != TTY_MAGIC, "U Bad %p\n", tty))
		return;
	mutex_unlock(&tty->legacy_mutex);
	tty_kref_put(tty);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Alan Cox | 24 | 61.54% | 1 | 33.33% | 
| Arnd Bergmann | 11 | 28.21% | 1 | 33.33% | 
| Peter Hurley | 4 | 10.26% | 1 | 33.33% | 
| Total | 39 | 100.00% | 3 | 100.00% | 
EXPORT_SYMBOL(tty_unlock);
void tty_lock_slave(struct tty_struct *tty)
{
	if (tty && tty != tty->link)
		tty_lock(tty);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Alan Cox | 17 | 68.00% | 1 | 33.33% | 
| Peter Hurley | 8 | 32.00% | 2 | 66.67% | 
| Total | 25 | 100.00% | 3 | 100.00% | 
void tty_unlock_slave(struct tty_struct *tty)
{
	if (tty && tty != tty->link)
		tty_unlock(tty);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Alan Cox | 19 | 76.00% | 1 | 50.00% | 
| Peter Hurley | 6 | 24.00% | 1 | 50.00% | 
| Total | 25 | 100.00% | 2 | 100.00% | 
void tty_set_lock_subclass(struct tty_struct *tty)
{
	lockdep_set_subclass(&tty->legacy_mutex, TTY_LOCK_SLAVE);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Peter Hurley | 20 | 100.00% | 2 | 100.00% | 
| Total | 20 | 100.00% | 2 | 100.00% | 
Overall Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Peter Hurley | 103 | 44.02% | 6 | 60.00% | 
| Alan Cox | 95 | 40.60% | 3 | 30.00% | 
| Arnd Bergmann | 36 | 15.38% | 1 | 10.00% | 
| Total | 234 | 100.00% | 10 | 100.00% | 
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.