lkml.org 
[lkml]   [2014]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC 08/16] kgr: sched.h, introduce kgr_task_safe helper
Date
To be used from some kthreads.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
---
include/linux/sched.h | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 25f54c79f757..afd5747bc7ff 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2969,6 +2969,15 @@ static inline void mm_init_owner(struct mm_struct *mm, struct task_struct *p)
}
#endif /* CONFIG_MM_OWNER */

+#ifdef CONFIG_KGR
+static inline void kgr_task_safe(struct task_struct *p)
+{
+ task_thread_info(p)->kgr_in_progress = false;
+}
+#else
+static inline void kgr_task_safe(struct task_struct *p) { }
+#endif /* CONFIG_KGR */
+
static inline unsigned long task_rlimit(const struct task_struct *tsk,
unsigned int limit)
{
--
1.9.2


\
 
 \ /
  Last update: 2014-04-30 18:21    [W:0.280 / U:1.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site