From 8ac9c082e6afbca05d6707b2ecaca9968393d8b4 Mon Sep 17 00:00:00 2001 From: Andy Ross Date: Fri, 8 Dec 2017 17:38:12 -0800 Subject: [PATCH] kernel: Move some macros K_NUM_PRIORITIES and K_NUM_PRIO_BITMAPS were defined in nano_internal.h, but used in only a handful of places. Move to kernel_structs.h (somewhat higher up in the hierarchy) to help with include file cycle-breaking. Arguably they are a better fit there anyway. Signed-off-by: Andy Ross --- kernel/include/kernel_internal.h | 6 +----- kernel/include/kernel_structs.h | 5 +++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/kernel/include/kernel_internal.h b/kernel/include/kernel_internal.h index 82f1b0a82b0..8dd12a655f6 100644 --- a/kernel/include/kernel_internal.h +++ b/kernel/include/kernel_internal.h @@ -15,11 +15,7 @@ #define _NANO_INTERNAL__H_ #include - -#define K_NUM_PRIORITIES \ - (CONFIG_NUM_COOP_PRIORITIES + CONFIG_NUM_PREEMPT_PRIORITIES + 1) - -#define K_NUM_PRIO_BITMAPS ((K_NUM_PRIORITIES + 31) >> 5) +#include #ifndef _ASMLANGUAGE diff --git a/kernel/include/kernel_structs.h b/kernel/include/kernel_structs.h index a135e13a2eb..86a53cb669b 100644 --- a/kernel/include/kernel_structs.h +++ b/kernel/include/kernel_structs.h @@ -15,6 +15,11 @@ #include #endif +#define K_NUM_PRIORITIES \ + (CONFIG_NUM_COOP_PRIORITIES + CONFIG_NUM_PREEMPT_PRIORITIES + 1) + +#define K_NUM_PRIO_BITMAPS ((K_NUM_PRIORITIES + 31) >> 5) + /* * Bitmask definitions for the struct k_thread.thread_state field. *