kernel: Fix nano_internal.h inclusion

_Swap() is defined in nano_internal.h.  Everything calls _Swap().
Pretty much nothing that called _Swap() included nano_internal.h,
expecting it to be picked up automatically through other headers (as
it happened, from the kernel arch-specific include file).  A new
_Swap() is going to need some other symbols in the inline definition,
so I needed to break that cycle.  Now nothing sees _Swap() defined
anymore.  Put nano_internal.h everywhere it's needed.

Our kernel includes remain a big awful yucky mess.  This makes things
more correct but no less ugly.  Needs cleanup.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
Andy Ross 2017-12-08 17:19:14 -08:00 committed by Anas Nashif
commit 32a444c54e
18 changed files with 18 additions and 1 deletions

View file

@ -12,6 +12,7 @@
#include <kernel_structs.h>
#include <wait_q.h>
#include <xtensa_config.h>
#include <nano_internal.h>
extern void _xt_user_exit(void);

View file

@ -27,6 +27,7 @@
#include <version.h>
#include <string.h>
#include <misc/dlist.h>
#include <nano_internal.h>
/* kernel build timestamp items */

View file

@ -17,7 +17,7 @@
#include <wait_q.h>
#include <misc/dlist.h>
#include <init.h>
#include <nano_internal.h>
#if (CONFIG_NUM_MBOX_ASYNC_MSGS > 0)

View file

@ -13,6 +13,7 @@
#include <misc/dlist.h>
#include <ksched.h>
#include <init.h>
#include <nano_internal.h>
extern struct k_mem_slab _k_mem_slab_list_start[];
extern struct k_mem_slab _k_mem_slab_list_end[];

View file

@ -10,6 +10,7 @@
#include <init.h>
#include <string.h>
#include <misc/__assert.h>
#include <nano_internal.h>
/* Linker-defined symbols bound the static pool structs */
extern struct k_mem_pool _k_mem_pool_list_start[];

View file

@ -20,6 +20,7 @@
#include <misc/dlist.h>
#include <init.h>
#include <syscall_handler.h>
#include <nano_internal.h>
extern struct k_msgq _k_msgq_list_start[];
extern struct k_msgq _k_msgq_list_end[];

View file

@ -36,6 +36,7 @@
#include <errno.h>
#include <init.h>
#include <syscall_handler.h>
#include <nano_internal.h>
#define RECORD_STATE_CHANGE(mutex) do { } while ((0))
#define RECORD_CONFLICT(mutex) do { } while ((0))

View file

@ -19,6 +19,7 @@
#include <misc/dlist.h>
#include <init.h>
#include <syscall_handler.h>
#include <nano_internal.h>
struct k_pipe_desc {
unsigned char *buffer; /* Position in src/dest buffer */

View file

@ -16,6 +16,7 @@
#include <kernel.h>
#include <kernel_structs.h>
#include <nano_internal.h>
#include <wait_q.h>
#include <ksched.h>
#include <misc/slist.h>

View file

@ -8,6 +8,7 @@
#include <pthread.h>
#include "ksched.h"
#include "wait_q.h"
#include <nano_internal.h>
void ready_one_thread(_wait_q_t *wq);

View file

@ -8,6 +8,7 @@
#include <pthread.h>
#include "ksched.h"
#include "wait_q.h"
#include <nano_internal.h>
void ready_one_thread(_wait_q_t *wq);

View file

@ -20,6 +20,7 @@
#include <ksched.h>
#include <misc/slist.h>
#include <init.h>
#include <nano_internal.h>
extern struct k_queue _k_queue_list_start[];
extern struct k_queue _k_queue_list_end[];

View file

@ -11,6 +11,7 @@
#include <wait_q.h>
#include <misc/util.h>
#include <syscall_handler.h>
#include <nano_internal.h>
/* the only struct _kernel instance */
struct _kernel _kernel = {0};

View file

@ -27,6 +27,7 @@
#include <ksched.h>
#include <init.h>
#include <syscall_handler.h>
#include <nano_internal.h>
extern struct k_sem _k_sem_list_start[];
extern struct k_sem _k_sem_list_end[];

View file

@ -18,6 +18,7 @@
#include <misc/__assert.h>
#include <init.h>
#include <syscall_handler.h>
#include <nano_internal.h>
extern struct k_stack _k_stack_list_start[];
extern struct k_stack _k_stack_list_end[];

View file

@ -24,6 +24,7 @@
#include <wait_q.h>
#include <atomic.h>
#include <syscall_handler.h>
#include <nano_internal.h>
extern struct _static_thread_data _static_thread_data_list_start[];
extern struct _static_thread_data _static_thread_data_list_end[];

View file

@ -9,6 +9,7 @@
#include <init.h>
#include <wait_q.h>
#include <syscall_handler.h>
#include <nano_internal.h>
extern struct k_timer _k_timer_list_start[];
extern struct k_timer _k_timer_list_end[];

View file

@ -9,6 +9,7 @@
#include <tc_util.h>
#include <kernel_structs.h>
#include <irq_offload.h>
#include <nano_internal.h>
#if defined(CONFIG_X86) && defined(CONFIG_X86_MMU)
#define STACKSIZE (8192)