mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-06 03:21:57 +00:00
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>
55 lines
1.7 KiB
C
55 lines
1.7 KiB
C
/*
|
|
* Copyright (c) 2017 Intel Corporation.
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#include <toolchain.h>
|
|
#include <linker/sections.h>
|
|
#include <sw_isr_table.h>
|
|
#include <arch/cpu.h>
|
|
|
|
/* There is an additional member at the end populated by the linker script
|
|
* which indicates the number of interrupts specified
|
|
*/
|
|
struct int_list_header {
|
|
u32_t table_size;
|
|
u32_t offset;
|
|
};
|
|
|
|
/* These values are not included in the resulting binary, but instead form the
|
|
* header of the initList section, which is used by gen_isr_tables.py to create
|
|
* the vector and sw isr tables,
|
|
*/
|
|
Z_GENERIC_SECTION(.irq_info) struct int_list_header _iheader = {
|
|
.table_size = IRQ_TABLE_SIZE,
|
|
.offset = CONFIG_GEN_IRQ_START_VECTOR,
|
|
};
|
|
|
|
/* These are placeholder tables. They will be replaced by the real tables
|
|
* generated by gen_isr_tables.py.
|
|
*
|
|
* z_irq_spurious and _isr_wrapper are used as placeholder values to
|
|
* ensure that they are not optimized out in the first link. The first
|
|
* link must contain the same symbols as the second one for the code
|
|
* generation to work.
|
|
*/
|
|
|
|
/* Some arches don't use a vector table, they have a common exception entry
|
|
* point for all interrupts. Don't generate a table in this case.
|
|
*/
|
|
#ifdef CONFIG_GEN_IRQ_VECTOR_TABLE
|
|
u32_t __irq_vector_table _irq_vector_table[IRQ_TABLE_SIZE] = {
|
|
[0 ...(IRQ_TABLE_SIZE - 1)] = (u32_t)&_isr_wrapper,
|
|
};
|
|
#endif
|
|
|
|
/* If there are no interrupts at all, or all interrupts are of the 'direct'
|
|
* type and bypass the _sw_isr_table, then do not generate one.
|
|
*/
|
|
#ifdef CONFIG_GEN_SW_ISR_TABLE
|
|
struct _isr_table_entry __sw_isr_table _sw_isr_table[IRQ_TABLE_SIZE] = {
|
|
[0 ...(IRQ_TABLE_SIZE - 1)] = {(void *)0x42, (void *)&z_irq_spurious},
|
|
};
|
|
#endif
|