summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorPhilip Cuadra <philipcuadra@google.com>2017-06-28 12:45:08 -0700
committerMichael Bestas <mkbestas@lineageos.org>2019-12-23 23:43:34 +0200
commit642b725c9cc052c2c1f2eaf44c34d7ffa8b4290f (patch)
treec73bc55611c08d2e4ce37d17554169904364f8e3 /include/linux
parent17e12f2572b325222a987c35c5d8922e92965c74 (diff)
tty: move tty_port workqueue to be a kthread
This makes each tty_port have their own kthread, hopefully allowing them a bit more freedom in scheduling when they reveive data. Based on a patch from Philip Cuadra <philipcuadra@google.com> Based on a patch from Greg Kroah-Hartman <gregkh@linuxfoundation.org> Bug: 36106419 Test: run Bluetooth audio, ensure separate tty thread is created. Signed-off-by: Philip Cuadra <philipcuadra@google.com> Change-Id: I9fd25235b26a66acb37a40304c356209b74ad46c
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/tty.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 812cdd8cff22..67e46308ca99 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -12,7 +12,7 @@
#include <uapi/linux/tty.h>
#include <linux/rwsem.h>
#include <linux/llist.h>
-
+#include <linux/kthread.h>
/*
* Lock subclasses for tty locks
@@ -82,7 +82,7 @@ static inline char *flag_buf_ptr(struct tty_buffer *b, int ofs)
struct tty_bufhead {
struct tty_buffer *head; /* Queue head */
- struct work_struct work;
+ struct kthread_work work;
struct mutex lock;
atomic_t priority;
struct tty_buffer sentinel;
@@ -240,6 +240,8 @@ struct tty_port {
based drain is needed else
set to size of fifo */
struct kref kref; /* Ref counter */
+ struct kthread_worker worker; /* worker thread */
+ struct task_struct *worker_thread; /* worker thread */
};
/*