lkml.org 
[lkml]   [2015]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] sched: add sched_task_call()
On Thu, 19 Feb 2015, Jiri Kosina wrote:

> > How about with a TIF_IN_USERSPACE thread flag? It could be cleared/set
> > right at the border. Then for running tasks it's as simple as:
> >
> > if (test_tsk_thread_flag(task, TIF_IN_USERSPACE))
> > klp_switch_task_universe(task);
>
> That's in principle what CONTEXT_TRACKING is doing, i.e. the condition
> we'd be interested in would be
>
> __this_cpu_read(context_tracking.state) == IN_USER

Well, more precisely

per_cpu(context_tracking.state, cpu) == IN_USER

of course.

--
Jiri Kosina
SUSE Labs


\
 
 \ /
  Last update: 2015-02-19 23:01    [W:0.206 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site