cregit-Linux how code gets into the kernel

Release 4.16 drivers/tty/tty_mutex.c

Directory: drivers/tty
// SPDX-License-Identifier: GPL-2.0
#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

PersonTokensPropCommitsCommitProp
Alan Cox2461.54%125.00%
Arnd Bergmann923.08%125.00%
Peter Hurley615.38%250.00%
Total39100.00%4100.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

PersonTokensPropCommitsCommitProp
Peter Hurley59100.00%2100.00%
Total59100.00%2100.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

PersonTokensPropCommitsCommitProp
Alan Cox2769.23%133.33%
Arnd Bergmann820.51%133.33%
Peter Hurley410.26%133.33%
Total39100.00%3100.00%

EXPORT_SYMBOL(tty_unlock);
void tty_lock_slave(struct tty_struct *tty) { if (tty && tty != tty->link) tty_lock(tty); }

Contributors

PersonTokensPropCommitsCommitProp
Alan Cox1768.00%133.33%
Peter Hurley832.00%266.67%
Total25100.00%3100.00%


void tty_unlock_slave(struct tty_struct *tty) { if (tty && tty != tty->link) tty_unlock(tty); }

Contributors

PersonTokensPropCommitsCommitProp
Alan Cox1976.00%266.67%
Peter Hurley624.00%133.33%
Total25100.00%3100.00%


void tty_set_lock_subclass(struct tty_struct *tty) { lockdep_set_subclass(&tty->legacy_mutex, TTY_LOCK_SLAVE); }

Contributors

PersonTokensPropCommitsCommitProp
Peter Hurley20100.00%2100.00%
Total20100.00%2100.00%


Overall Contributors

PersonTokensPropCommitsCommitProp
Peter Hurley10343.83%660.00%
Alan Cox9339.57%220.00%
Arnd Bergmann3816.17%110.00%
Greg Kroah-Hartman10.43%110.00%
Total235100.00%10100.00%
Directory: drivers/tty
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.