Begin consolidation of arch-independent private nanokernel APIs
Introduces nano_internal.h, which will declare all architecture- independent non-public nanokernel APIs. This file is automatically incorporated by the various architecture-specific include files for non-public nanokernel APIs, and will not normally be included directly by any other files. Change-Id: I9f3de812a5747cc720fa0ff739007315e8d07dd9 Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
This commit is contained in:
parent
69555e8efd
commit
bff7fc17fe
|
@ -40,7 +40,6 @@
|
|||
#include <arch/cpu.h>
|
||||
#include <toolchain.h>
|
||||
#include <nanok.h>
|
||||
#include <nanocontextentry.h>
|
||||
#include <offsets.h>
|
||||
|
||||
/* initial stack frame */
|
||||
|
|
|
@ -53,6 +53,7 @@ extern "C" {
|
|||
#include <arch/cpu.h>
|
||||
|
||||
#ifndef _ASMLANGUAGE
|
||||
#include <../../../kernel/nanokernel/include/nano_internal.h>
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -40,7 +40,6 @@ architecture.
|
|||
#include <arch/cpu.h>
|
||||
#include <toolchain.h>
|
||||
#include <nanok.h>
|
||||
#include <nanocontextentry.h>
|
||||
|
||||
tNANO _nanokernel = {0};
|
||||
|
||||
|
|
|
@ -53,6 +53,7 @@ extern "C" {
|
|||
#include <arch/cpu.h>
|
||||
|
||||
#ifndef _ASMLANGUAGE
|
||||
#include <../../../kernel/nanokernel/include/nano_internal.h>
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -44,7 +44,6 @@ processor architecture.
|
|||
#include <toolchain.h>
|
||||
#include <sections.h>
|
||||
#include <nanok.h>
|
||||
#include <nanocontextentry.h>
|
||||
|
||||
|
||||
/* the one and only nanokernel control structure */
|
||||
|
|
|
@ -53,7 +53,7 @@ offsets.o module.
|
|||
|
||||
#ifndef _ASMLANGUAGE
|
||||
#include <nanokernel.h> /* public nanokernel API */
|
||||
#include <arch/x86/arch.h> /* private IA-32 definitions */
|
||||
#include <../../../kernel/nanokernel/include/nano_internal.h>
|
||||
#include <stdint.h>
|
||||
/*
|
||||
* This pulls in the code shared with the IDT generator that actually
|
||||
|
|
|
@ -44,30 +44,6 @@ struct _nano_queue {
|
|||
void *tail;
|
||||
};
|
||||
|
||||
/* context entry point function typedef */
|
||||
|
||||
typedef void *_ContextArg;
|
||||
typedef void (*_ContextEntry)(_ContextArg arg1,
|
||||
_ContextArg arg2,
|
||||
_ContextArg arg3);
|
||||
|
||||
/* Private API to set and clear essential fiber/task flag */
|
||||
extern void _context_essential_set(void);
|
||||
extern void _context_essential_clear(void);
|
||||
|
||||
/* Private API to clean up when a context is aborted */
|
||||
#if defined(CONFIG_CONTEXT_MONITOR)
|
||||
extern void _context_exit(tCCS *ccs);
|
||||
#else
|
||||
#define _context_exit(ccs) \
|
||||
do {/* nothing */ \
|
||||
} while (0)
|
||||
#endif /* CONFIG_CONTEXT_MONITOR */
|
||||
|
||||
struct nano_lifo;
|
||||
|
||||
extern void *_nano_fiber_lifo_get_panic(struct nano_lifo *lifo);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include <stddef.h>
|
||||
#include <kernel_struct.h>
|
||||
#include <kernel_main.h>
|
||||
#include <clock_vars.h>
|
||||
#include <nanok.h>
|
||||
|
||||
#define KERNEL_ENTRY(A) _k_task_call(A)
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* nanocontextentry.h - context entry wrapper definitions */
|
||||
/* architecture-independent private nanokernel APIs */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2010-2012, 2014-2015 Wind River Systems, Inc.
|
||||
|
@ -32,13 +32,11 @@
|
|||
|
||||
/*
|
||||
DESCRIPTION
|
||||
This module provides definitions for a wrapper
|
||||
This file contains private nanokernel APIs that are not architecture-specific.
|
||||
*/
|
||||
|
||||
#ifndef _NANOCONTEXTENTRY__H_
|
||||
#define _NANOCONTEXTENTRY__H_
|
||||
|
||||
#include <nanok.h>
|
||||
#ifndef _NANO_INTERNAL__H_
|
||||
#define _NANO_INTERNAL__H_
|
||||
|
||||
#ifndef _ASMLANGUAGE
|
||||
|
||||
|
@ -46,15 +44,43 @@ This module provides definitions for a wrapper
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* context entry point declarations */
|
||||
|
||||
typedef void *_ContextArg;
|
||||
typedef void (*_ContextEntry)(_ContextArg arg1,
|
||||
_ContextArg arg2,
|
||||
_ContextArg arg3);
|
||||
|
||||
extern void _context_entry(_ContextEntry,
|
||||
_ContextArg,
|
||||
_ContextArg,
|
||||
_ContextArg);
|
||||
|
||||
/* set and clear essential fiber/task flag */
|
||||
|
||||
extern void _context_essential_set(void);
|
||||
extern void _context_essential_clear(void);
|
||||
|
||||
/* clean up when a context is aborted */
|
||||
|
||||
#if defined(CONFIG_CONTEXT_MONITOR)
|
||||
extern void _context_exit(tCCS *ccs);
|
||||
#else
|
||||
#define _context_exit(ccs) \
|
||||
do {/* nothing */ \
|
||||
} while (0)
|
||||
#endif /* CONFIG_CONTEXT_MONITOR */
|
||||
|
||||
/* special nanokernel object APIs */
|
||||
|
||||
struct nano_lifo;
|
||||
|
||||
extern void *_nano_fiber_lifo_get_panic(struct nano_lifo *lifo);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#endif /* _NANOCONTEXTENTRY__H_ */
|
||||
#endif /* _NANO_INTERNAL__H_ */
|
|
@ -40,7 +40,6 @@ tasks or fibers.
|
|||
#include <sections.h>
|
||||
|
||||
#include <nanok.h>
|
||||
#include <nanocontextentry.h>
|
||||
#include <misc/printk.h>
|
||||
|
||||
/*******************************************************************************
|
||||
|
|
Loading…
Reference in a new issue