Move PASTE() to common.h
authorBarret Rhoden <brho@cs.berkeley.edu>
Mon, 23 Apr 2018 17:32:58 +0000 (13:32 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Mon, 30 Apr 2018 18:37:05 +0000 (14:37 -0400)
We had it defined in two locations.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/include/common.h
kern/include/percpu.h
kern/src/manager.c

index cba0003..178cfef 100644 (file)
@@ -7,6 +7,9 @@
 #ifdef CONFIG_64BIT
 #endif
 
+#define PASTE_THEM(x, y) x ## y
+#define PASTE(x, y) PASTE_THEM(x, y)
+
 // Efficient min and max operations
 #define MIN(_a, _b)                                            \
 ({                                                             \
index ffccf4e..483b31b 100644 (file)
@@ -39,9 +39,6 @@
 #define PERCPU_SECTION __percpu
 #define PERCPU_SECTION_STR STRINGIFY(PERCPU_SECTION)
 
-#define PASTE_THEM(x, y) x ## y
-#define PASTE(x, y) PASTE_THEM(x, y)
-
 #define PERCPU_VARNAME(var) PASTE(__percpu_, var)
 
 #define PERCPU_START_VAR PASTE(__start_, PERCPU_SECTION)
index 38296ed..96b3dcb 100644 (file)
@@ -35,7 +35,6 @@
 void manager(void)
 {
        // LoL
-       #define PASTE(s1,s2) s1 ## s2
        #define MANAGER_FUNC(dev) PASTE(manager_,dev)
 
        #if !defined(DEVELOPER_NAME) && \