Update reserved function names starting with one underscore, replacing them as follows: '_k_' with 'z_' '_K_' with 'Z_' '_handler_' with 'z_handl_' '_Cstart' with 'z_cstart' '_Swap' with 'z_swap' This renaming is done on both global and those static function names in kernel/include and include/. Other static function names in kernel/ are renamed by removing the leading underscore. Other function names not starting with any prefix listed above are renamed starting with a 'z_' or 'Z_' prefix. Function names starting with two or three leading underscores are not automatcally renamed since these names will collide with the variants with two or three leading underscores. Various generator scripts have also been updated as well as perf, linker and usb files. These are drivers/serial/uart_handlers.c include/linker/kobject-text.ld kernel/include/syscall_handler.h scripts/gen_kobject_list.py scripts/gen_syscall_header.py Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
82 lines
1.6 KiB
C
82 lines
1.6 KiB
C
/*
|
|
* Copyright (c) 2017 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
/**
|
|
* @file
|
|
* @brief Per-arch thread definition
|
|
*
|
|
* This file contains definitions for
|
|
*
|
|
* struct _thread_arch
|
|
* struct _callee_saved
|
|
* struct _caller_saved
|
|
*
|
|
* necessary to instantiate instances of struct k_thread.
|
|
*/
|
|
|
|
#ifndef ZEPHYR_ARCH_ARC_INCLUDE_KERNEL_ARCH_THREAD_H_
|
|
#define ZEPHYR_ARCH_ARC_INCLUDE_KERNEL_ARCH_THREAD_H_
|
|
|
|
/*
|
|
* Reason a thread has relinquished control: threads can only be in the NONE
|
|
* or COOP state, threads can be one in the four.
|
|
*/
|
|
#define _CAUSE_NONE 0
|
|
#define _CAUSE_COOP 1
|
|
#define _CAUSE_RIRQ 2
|
|
#define _CAUSE_FIRQ 3
|
|
|
|
#ifndef _ASMLANGUAGE
|
|
#include <zephyr/types.h>
|
|
|
|
struct _caller_saved {
|
|
/*
|
|
* Saved on the stack as part of handling a regular IRQ or by the
|
|
* kernel when calling the FIRQ return code.
|
|
*/
|
|
};
|
|
|
|
typedef struct _caller_saved _caller_saved_t;
|
|
|
|
struct _callee_saved {
|
|
u32_t sp; /* r28 */
|
|
};
|
|
typedef struct _callee_saved _callee_saved_t;
|
|
|
|
struct _thread_arch {
|
|
|
|
/* interrupt key when relinquishing control */
|
|
u32_t intlock_key;
|
|
|
|
/* one of the _CAUSE_xxxx definitions above */
|
|
int relinquish_cause;
|
|
|
|
/* return value from z_swap */
|
|
unsigned int return_value;
|
|
|
|
#ifdef CONFIG_ARC_STACK_CHECKING
|
|
/* High address of stack region, stack grows downward from this
|
|
* location. Usesd for hardware stack checking
|
|
*/
|
|
u32_t k_stack_base;
|
|
u32_t k_stack_top;
|
|
#ifdef CONFIG_USERSPACE
|
|
u32_t u_stack_base;
|
|
u32_t u_stack_top;
|
|
#endif
|
|
#endif
|
|
|
|
#ifdef CONFIG_USERSPACE
|
|
u32_t priv_stack_start;
|
|
#endif
|
|
};
|
|
|
|
typedef struct _thread_arch _thread_arch_t;
|
|
|
|
#endif /* _ASMLANGUAGE */
|
|
|
|
#endif /* ZEPHYR_ARCH_ARC_INCLUDE_KERNEL_ARCH_THREAD_H_ */
|