Limit exposure of non-public microkernel APIs needed by sysgen

Hides the existence of these routines from the microkernel's main
public API include file, but allows both sysgen and the microkernel
itself to continue accessing them.

Change-Id: Iaf1beff81d045e9df29eb07517793e4b4410f51e
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
This commit is contained in:
Allan Stephens 2015-05-11 16:19:10 -04:00 committed by Anas Nashif
commit fb64710410
8 changed files with 12 additions and 12 deletions

View file

@ -38,7 +38,6 @@
#include <cputype.h> #include <cputype.h>
#include <microkernel/k_types.h> #include <microkernel/k_types.h>
#include <microkernel/k_struct.h> #include <microkernel/k_struct.h>
#include <microkernel/entries.h>
#include <clock_vars.h> #include <clock_vars.h>
#include <microkernel/task.h> #include <microkernel/task.h>
@ -69,9 +68,6 @@ extern int task_offload_to_fiber(int (*)(), void *);
typedef void (*taskstartfunction)(void); typedef void (*taskstartfunction)(void);
typedef void (*taskabortfunction)(void); typedef void (*taskabortfunction)(void);
/* Miscellaneous */
extern void kernel_init(void);
extern PFN_CHANNEL_RWT pKS_Channel_PutWT; extern PFN_CHANNEL_RWT pKS_Channel_PutWT;
extern PFN_CHANNEL_RWT pKS_Channel_GetWT; extern PFN_CHANNEL_RWT pKS_Channel_GetWT;

View file

@ -101,8 +101,6 @@ extern PFN_CHANNEL_RWT pKS_Channel_GetWT; /* maps to KS__ChannelGetWT
/* base API functions */ /* base API functions */
extern void _pipe_init(void);
extern int _task_pipe_put(kpipe_t id, extern int _task_pipe_put(kpipe_t id,
void *pBuffer, void *pBuffer,
int iNbrBytesToWrite, int iNbrBytesToWrite,

View file

@ -39,6 +39,16 @@
extern "C" { extern "C" {
#endif #endif
/* Non-public microkernel APIs referenced by kernel_main.c */
extern void _pipe_init(void);
extern void _mem_map_init(void);
extern void _mem_pools_init(void);
extern void kernel_init(void);
extern int kernel_idle(void);
/* Format of routines invoked by microkernel server */
typedef void (*kernelfunc)(struct k_args *); typedef void (*kernelfunc)(struct k_args *);
/* Jumptable entrypoints */ /* Jumptable entrypoints */

View file

@ -37,8 +37,6 @@
extern "C" { extern "C" {
#endif #endif
extern void _mem_map_init(void);
extern int task_mem_map_used_get(kmemory_map_t map); extern int task_mem_map_used_get(kmemory_map_t map);
extern int _task_mem_map_alloc(kmemory_map_t mmap, void **mptr, int32_t time); extern int _task_mem_map_alloc(kmemory_map_t mmap, void **mptr, int32_t time);
extern void _task_mem_map_free(kmemory_map_t mmap, void **mptr); extern void _task_mem_map_free(kmemory_map_t mmap, void **mptr);

View file

@ -37,8 +37,6 @@
extern "C" { extern "C" {
#endif #endif
extern void _mem_pools_init(void);
extern int _task_mem_pool_alloc(struct k_block *B, kmemory_pool_t pid, int size, int32_t time); extern int _task_mem_pool_alloc(struct k_block *B, kmemory_pool_t pid, int size, int32_t time);
extern void task_mem_pool_free(struct k_block *bl); extern void task_mem_pool_free(struct k_block *bl);

View file

@ -72,8 +72,6 @@ extern void task_sleep(int32_t ticks);
extern int task_workload_get(void); extern int task_workload_get(void);
extern void workload_time_slice_set(int32_t t); extern void workload_time_slice_set(int32_t t);
extern int kernel_idle(void);
#define isr_cycle_get_32() task_cycle_get_32() #define isr_cycle_get_32() task_cycle_get_32()
#define isr_tick_get_32() task_tick_get_32() #define isr_tick_get_32() task_tick_get_32()
#define isr_tick_get() task_tick_get() #define isr_tick_get() task_tick_get()

View file

@ -34,6 +34,7 @@
#define MINIK_H #define MINIK_H
#include <microkernel/k_struct.h> #include <microkernel/k_struct.h>
#include <microkernel/entries.h>
#include <clock_vars.h> #include <clock_vars.h>
#define KERNEL_ENTRY(A) _k_task_call(A) #define KERNEL_ENTRY(A) _k_task_call(A)

View file

@ -303,6 +303,7 @@ def kernel_main_c_header():
do_not_edit_warning + do_not_edit_warning +
"\n" + "\n" +
"#include <microkernel.h>\n" + "#include <microkernel.h>\n" +
"#include <microkernel/entries.h>\n" +
"#include <toolchain.h>\n" + "#include <toolchain.h>\n" +
"#include <sections.h>\n" + "#include <sections.h>\n" +
"#include <vxmicro.h>\n") "#include <vxmicro.h>\n")