lkml.org 
[lkml]   [2018]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 28/45] C++: Move ctx_state enum out of struct context_tracking
From
Date
Move ctx_state enum out of struct context_tracking so that it isn't limited
in scope.

Signed-off-by: David Howells <dhowells@redhat.com>
---

include/linux/context_tracking_state.h | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/include/linux/context_tracking_state.h b/include/linux/context_tracking_state.h
index f128dc3be0df..02a9efe0827e 100644
--- a/include/linux/context_tracking_state.h
+++ b/include/linux/context_tracking_state.h
@@ -5,6 +5,13 @@
#include <linux/percpu.h>
#include <linux/static_key.h>

+enum ctx_state {
+ CONTEXT_DISABLED = -1, /* returned by ct_state() if unknown */
+ CONTEXT_KERNEL = 0,
+ CONTEXT_USER,
+ CONTEXT_GUEST,
+};
+
struct context_tracking {
/*
* When active is false, probes are unset in order
@@ -14,12 +21,7 @@ struct context_tracking {
*/
bool active;
int recursion;
- enum ctx_state {
- CONTEXT_DISABLED = -1, /* returned by ct_state() if unknown */
- CONTEXT_KERNEL = 0,
- CONTEXT_USER,
- CONTEXT_GUEST,
- } state;
+ enum ctx_state state;
};

#ifdef CONFIG_CONTEXT_TRACKING
\
 
 \ /
  Last update: 2018-04-01 22:47    [W:0.174 / U:0.656 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site