mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
Create a new subsystem that probes on kernel boundaries to keep track of the transitions between level contexts with two basic initial contexts: user or kernel. This is an abstraction of some RCU code that use such tracking to implement its userspace extended quiescent state. We need to pull this up from RCU into this new level of indirection because this tracking is also going to be used to implement an "on demand" generic virtual cputime accounting. A necessary step to shutdown the tick while still accounting the cputime. Signed-off-by: Frederic Weisbecker <[email protected]> Cc: Andrew Morton <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Li Zhong <[email protected]> Cc: Gilad Ben-Yossef <[email protected]> Reviewed-by: Steven Rostedt <[email protected]> [ paulmck: fix whitespace error and email address. ] Signed-off-by: Paul E. McKenney <[email protected]>
19 lines
526 B
C
19 lines
526 B
C
#ifndef _LINUX_CONTEXT_TRACKING_H
|
|
#define _LINUX_CONTEXT_TRACKING_H
|
|
|
|
#ifdef CONFIG_CONTEXT_TRACKING
|
|
#include <linux/sched.h>
|
|
|
|
extern void user_enter(void);
|
|
extern void user_exit(void);
|
|
extern void context_tracking_task_switch(struct task_struct *prev,
|
|
struct task_struct *next);
|
|
#else
|
|
static inline void user_enter(void) { }
|
|
static inline void user_exit(void) { }
|
|
static inline void context_tracking_task_switch(struct task_struct *prev,
|
|
struct task_struct *next) { }
|
|
#endif /* !CONFIG_CONTEXT_TRACKING */
|
|
|
|
#endif
|