unified: Rename ESSENTIAL to K_ESSENTIAL

Adds standard prefix to symbolic option that flags a thread
as essential to system operation.

Change-Id: Ia904a81ce343fdd1cd44caaaeae641d822777f9b
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
This commit is contained in:
Allan Stephens 2016-11-02 15:55:20 -05:00 committed by Anas Nashif
commit a3f3de3741
12 changed files with 21 additions and 21 deletions

View file

@ -82,7 +82,7 @@ static ALWAYS_INLINE void thread_monitor_init(struct tcs *tcs)
* @param parameter2 second param to entry point
* @param parameter3 third param to entry point
* @param priority thread priority
* @param options thread options: ESSENTIAL
* @param options thread options: K_ESSENTIAL
*
* @return N/A
*/

View file

@ -161,7 +161,7 @@ typedef struct callee_saved tCalleeSaved;
#endif
#define USE_FP 0x010 /* 1 = thread uses floating point unit */
#define ESSENTIAL 0x200 /* 1 = system thread that must not abort */
#define K_ESSENTIAL 0x200 /* 1 = system thread that must not abort */
#define NO_METRICS 0x400 /* 1 = _Swap() not to update task metrics */
/* stacks */

View file

@ -77,7 +77,7 @@ static ALWAYS_INLINE void thread_monitor_init(struct tcs *tcs)
* @param parameter2 entry point to the second param
* @param parameter3 entry point to the third param
* @param priority thread priority
* @param options thread options: ESSENTIAL, USE_FP
* @param options thread options: K_ESSENTIAL, USE_FP
*
* @return N/A
*/

View file

@ -125,7 +125,7 @@ typedef struct preempt tPreempt;
#endif
#define USE_FP 0x010 /* 1 = thread uses floating point unit */
#define ESSENTIAL 0x200 /* 1 = system thread that must not abort */
#define K_ESSENTIAL 0x200 /* 1 = system thread that must not abort */
#define NO_METRICS 0x400 /* 1 = _Swap() not to update task metrics */
/* stacks */

View file

@ -73,7 +73,7 @@ extern "C" {
#define INT_ACTIVE 0x002 /* 1 = executing context is interrupt handler */
#define EXC_ACTIVE 0x004 /* 1 = executing context is exception handler */
#define USE_FP 0x010 /* 1 = thread uses floating point unit */
#define ESSENTIAL 0x200 /* 1 = system thread that must not abort */
#define K_ESSENTIAL 0x200 /* 1 = system thread that must not abort */
#define NO_METRICS 0x400 /* 1 = _Swap() not to update task metrics */
/* stacks */

View file

@ -81,7 +81,7 @@ static ALWAYS_INLINE void thread_monitor_init(struct tcs *tcs)
* @param pStackMem pointer to thread stack memory
* @param stackSize size of a stack in bytes
* @param priority thread priority
* @param options thread options: ESSENTIAL, USE_FP, USE_SSE
* @param options thread options: K_ESSENTIAL, USE_FP, USE_SSE
*
* @return N/A
*/
@ -325,7 +325,7 @@ __asm__("\t.globl _thread_entry\n"
* @param parameter2 second param to entry point
* @param parameter3 third param to entry point
* @param priority thread priority
* @param options thread options: ESSENTIAL, USE_FP, USE_SSE
* @param options thread options: K_ESSENTIAL, USE_FP, USE_SSE
*
*
* @return opaque pointer to initialized TCS structure

View file

@ -89,7 +89,7 @@
#define EXC_ACTIVE 0x4 /* 1 = executing context is exception handler */
#define USE_FP 0x10 /* 1 = thread uses floating point unit */
#define USE_SSE 0x20 /* 1 = thread uses SSEx instructions */
#define ESSENTIAL 0x200 /* 1 = system thread that must not abort */
#define K_ESSENTIAL 0x200 /* 1 = system thread that must not abort */
#define NO_METRICS 0x400 /* 1 = _Swap() not to update task metrics */
#define NO_METRICS_BIT_OFFSET 0xa /* Bit position of NO_METRICS */

View file

@ -121,7 +121,7 @@ A thread that requires a thread option specifies it by name, using the
The following thread options are supported.
:c:macro:`ESSENTIAL`
:c:macro:`K_ESSENTIAL`
This option tags the thread as an :dfn:`essential thread`. This instructs
the kernel to treat the termination or aborting of the thread as a fatal
system error.

View file

@ -59,7 +59,7 @@ nano_context_type_t sys_execution_context_type_get(void)
*/
void _thread_essential_set(void)
{
_nanokernel.current->flags |= ESSENTIAL;
_nanokernel.current->flags |= K_ESSENTIAL;
}
/**
@ -74,7 +74,7 @@ void _thread_essential_set(void)
*/
void _thread_essential_clear(void)
{
_nanokernel.current->flags &= ~ESSENTIAL;
_nanokernel.current->flags &= ~K_ESSENTIAL;
}
/**
@ -88,7 +88,7 @@ void _thread_essential_clear(void)
*/
int _is_thread_essential(void)
{
return _nanokernel.current->flags & ESSENTIAL;
return _nanokernel.current->flags & K_ESSENTIAL;
}
void sys_thread_busy_wait(uint32_t usec_to_wait)

View file

@ -210,7 +210,7 @@ static void nano_init(struct tcs *dummyOutContext)
*/
dummyOutContext->link = (struct tcs *)NULL;
dummyOutContext->flags = FIBER | ESSENTIAL;
dummyOutContext->flags = FIBER | K_ESSENTIAL;
dummyOutContext->prio = 0;
@ -249,7 +249,7 @@ static void nano_init(struct tcs *dummyOutContext)
* operates on _nanokernel.current, not _nanokernel.task ...
*/
_nanokernel.task->flags |= ESSENTIAL;
_nanokernel.task->flags |= K_ESSENTIAL;
initialize_nano_timeouts();

View file

@ -195,7 +195,7 @@ static void _main(void *unused1, void *unused2, void *unused3)
_init_static_threads();
_main_thread->flags &= ~ESSENTIAL;
_main_thread->flags &= ~K_ESSENTIAL;
#ifdef CONFIG_BOOT_TIME_MEASUREMENT
/* record timestamp for kernel's _main() function */
@ -249,7 +249,7 @@ static void prepare_multithreading(struct k_thread *dummy_thread)
* Do not insert dummy execution context in the list of fibers, so
* that it does not get scheduled back in once context-switched out.
*/
dummy_thread->flags = ESSENTIAL;
dummy_thread->flags = K_ESSENTIAL;
dummy_thread->prio = K_PRIO_COOP(0);
/* _nanokernel.ready_q is all zeroes */
@ -273,13 +273,13 @@ static void prepare_multithreading(struct k_thread *dummy_thread)
_new_thread(main_stack, MAIN_STACK_SIZE, NULL,
_main, NULL, NULL, NULL,
CONFIG_MAIN_THREAD_PRIORITY, ESSENTIAL);
CONFIG_MAIN_THREAD_PRIORITY, K_ESSENTIAL);
_mark_thread_as_started(_main_thread);
_add_thread_to_ready_q(_main_thread);
_new_thread(idle_stack, IDLE_STACK_SIZE, NULL,
idle, NULL, NULL, NULL,
K_LOWEST_THREAD_PRIO, ESSENTIAL);
K_LOWEST_THREAD_PRIO, K_ESSENTIAL);
_mark_thread_as_started(_idle_thread);
_add_thread_to_ready_q(_idle_thread);

View file

@ -67,7 +67,7 @@ int k_am_in_isr(void)
*/
void _thread_essential_set(void)
{
_current->flags |= ESSENTIAL;
_current->flags |= K_ESSENTIAL;
}
/*
@ -77,7 +77,7 @@ void _thread_essential_set(void)
*/
void _thread_essential_clear(void)
{
_current->flags &= ~ESSENTIAL;
_current->flags &= ~K_ESSENTIAL;
}
/*
@ -87,7 +87,7 @@ void _thread_essential_clear(void)
*/
int _is_thread_essential(void)
{
return _current->flags & ESSENTIAL;
return _current->flags & K_ESSENTIAL;
}
void k_busy_wait(uint32_t usec_to_wait)