cregit-Linux how code gets into the kernel

Release 4.7 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 coxalan cox3384.62%250.00%
peter hurleypeter 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 hurleypeter 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 coxalan cox2461.54%133.33%
arnd bergmannarnd bergmann1128.21%133.33%
peter hurleypeter 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 coxalan cox1768.00%133.33%
peter hurleypeter 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 coxalan cox1976.00%150.00%
peter hurleypeter 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 hurleypeter hurley20100.00%2100.00%
Total20100.00%2100.00%


Overall Contributors

PersonTokensPropCommitsCommitProp
peter hurleypeter hurley10344.02%666.67%
alan coxalan cox9540.60%222.22%
arnd bergmannarnd 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.
{% endraw %}