Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolai Stange <nstange@suse.de>2017-10-05 12:12:29 +0200
committerMiroslav Benes <mbenes@suse.cz>2017-11-23 10:54:08 +0100
commit237c8f3d13c382321d3e65d138d328eae0b82f6c (patch)
tree4bc760571c97ed83d98644eda778bc2929810d9c
parent8e1e705d4d56981949f7ae3854d8e1cc2be7f40f (diff)
shadow variables: add KGR_SHADOW_ID helper
As shadow variables are supposed to be shared among different KGraft modules their id's must be compile time constants. Introduce the KGR_SHADOW_ID helper macro for generating them in a uniform manner based on the bsc# number and a local id. Signed-off-by: Nicolai Stange <nstange@suse.de> Signed-off-by: Miroslav Benes <mbenes@suse.cz>
-rw-r--r--shadow.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/shadow.h b/shadow.h
index 1a4896d..5b8de53 100644
--- a/shadow.h
+++ b/shadow.h
@@ -11,4 +11,6 @@ void klp_shadow_free_all(unsigned long id);
int kgr_shadow_init(void);
void kgr_shadow_cleanup(void);
+#define KGR_SHADOW_ID(bsc, id) (((unsigned long)(bsc) << 6) | id)
+
#endif