cregit-Linux how code gets into the kernel

Release 4.11 drivers/tty/tty_mutex.c

Directory: drivers/tty
#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 Cox3384.62%250.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 Cox2461.54%133.33%
Arnd Bergmann1128.21%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%150.00%
Peter Hurley624.00%150.00%
Total25100.00%2100.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 Hurley10344.02%666.67%
Alan Cox9540.60%222.22%
Arnd Bergmann3615.38%111.11%
Total234100.00%9100.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.