Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions arch/arc/include/kernel_arch_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
#ifndef ZEPHYR_ARCH_ARC_INCLUDE_KERNEL_ARCH_DATA_H_
#define ZEPHYR_ARCH_ARC_INCLUDE_KERNEL_ARCH_DATA_H_

#ifdef __cplusplus
extern "C" {
#endif

#include <toolchain.h>
#include <linker/sections.h>
#include <arch/cpu.h>
Expand All @@ -36,9 +32,11 @@ extern "C" {
#include <zephyr/types.h>
#include <sys/util.h>
#include <sys/dlist.h>

#ifdef __cplusplus
extern "C" {
#endif

#ifndef _ASMLANGUAGE
#ifdef CONFIG_ARC_HAS_SECURE
struct _irq_stack_frame {
u32_t lp_end;
Expand Down Expand Up @@ -170,6 +168,10 @@ struct _callee_saved_stack {

typedef struct _callee_saved_stack _callee_saved_stack_t;

#ifdef __cplusplus
}
#endif

#endif /* _ASMLANGUAGE */

/* stacks */
Expand All @@ -179,8 +181,5 @@ typedef struct _callee_saved_stack _callee_saved_stack_t;
#define STACK_ROUND_UP(x) ROUND_UP(x, STACK_ALIGN_SIZE)
#define STACK_ROUND_DOWN(x) ROUND_DOWN(x, STACK_ALIGN_SIZE)

#ifdef __cplusplus
}
#endif

#endif /* ZEPHYR_ARCH_ARC_INCLUDE_KERNEL_ARCH_DATA_H_ */
12 changes: 6 additions & 6 deletions arch/arc/include/kernel_arch_func.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@
#ifndef ZEPHYR_ARCH_ARC_INCLUDE_KERNEL_ARCH_FUNC_H_
#define ZEPHYR_ARCH_ARC_INCLUDE_KERNEL_ARCH_FUNC_H_

#ifdef __cplusplus
extern "C" {
#endif

#if !defined(_ASMLANGUAGE)

#ifdef CONFIG_CPU_ARCV2
#include <v2/cache.h>
#include <v2/irq.h>
#endif

#ifdef __cplusplus
extern "C" {
#endif

static ALWAYS_INLINE _cpu_t *z_arch_curr_cpu(void)
{
#ifdef CONFIG_SMP
Expand Down Expand Up @@ -80,10 +80,10 @@ extern void z_arc_fatal_error(unsigned int reason, const z_arch_esf_t *esf);

extern void z_arch_sched_ipi(void);

#endif /* _ASMLANGUAGE */

#ifdef __cplusplus
}
#endif

#endif /* _ASMLANGUAGE */

#endif /* ZEPHYR_ARCH_ARC_INCLUDE_KERNEL_ARCH_FUNC_H_ */
9 changes: 9 additions & 0 deletions arch/arc/include/kernel_arch_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
#ifndef _ASMLANGUAGE
#include <zephyr/types.h>

#ifdef __cplusplus
extern "C" {
#endif

struct _callee_saved {
u32_t sp; /* r28 */
};
Expand Down Expand Up @@ -60,6 +64,11 @@ struct _thread_arch {

typedef struct _thread_arch _thread_arch_t;

#ifdef __cplusplus
}
#endif

#endif /* _ASMLANGUAGE */


#endif /* ZEPHYR_ARCH_ARC_INCLUDE_KERNEL_ARCH_THREAD_H_ */
8 changes: 0 additions & 8 deletions arch/arc/include/swap_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
#include <toolchain.h>
#include <arch/cpu.h>

#ifdef __cplusplus
extern "C" {
#endif

#ifdef _ASMLANGUAGE

/* entering this macro, current is in r2 */
Expand Down Expand Up @@ -338,8 +334,4 @@ extern "C" {

#endif /* _ASMLANGUAGE */

#ifdef __cplusplus
}
#endif

#endif /* ZEPHYR_ARCH_ARC_INCLUDE_SWAP_MACROS_H_ */
8 changes: 4 additions & 4 deletions arch/arc/include/v2/cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@

#include <arch/cpu.h>

#ifndef _ASMLANGUAGE

#ifdef __cplusplus
extern "C" {
#endif

#ifndef _ASMLANGUAGE

/* i-cache defines for IC_CTRL register */
#define IC_CACHE_ENABLE 0x00
#define IC_CACHE_DISABLE 0x01
Expand Down Expand Up @@ -50,10 +50,10 @@ static ALWAYS_INLINE void z_icache_setup(void)
}
}

#endif /* _ASMLANGUAGE */

#ifdef __cplusplus
}
#endif

#endif /* _ASMLANGUAGE */

#endif /* ZEPHYR_ARCH_ARC_INCLUDE_V2_CACHE_H_ */
12 changes: 6 additions & 6 deletions arch/arc/include/vector_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
#ifndef ZEPHYR_ARCH_ARC_INCLUDE_VECTOR_TABLE_H_
#define ZEPHYR_ARCH_ARC_INCLUDE_VECTOR_TABLE_H_

#ifdef __cplusplus
extern "C" {
#endif

#define EXC_EV_TRAP 0x9

#ifdef _ASMLANGUAGE
Expand Down Expand Up @@ -55,6 +51,10 @@ GTEXT(_isr_wrapper)

#else

#ifdef __cplusplus
extern "C" {
#endif

extern void __reset(void);
extern void __memory_error(void);
extern void __instruction_error(void);
Expand All @@ -70,10 +70,10 @@ extern void __ev_div_zero(void);
extern void __ev_dc_error(void);
extern void __ev_maligned(void);

#endif /* _ASMLANGUAGE */

#ifdef __cplusplus
}
#endif

#endif /* _ASMLANGUAGE */

#endif /* ZEPHYR_ARCH_ARC_INCLUDE_VECTOR_TABLE_H_ */
14 changes: 7 additions & 7 deletions arch/arm/core/cortex_m/vector_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
#ifndef ZEPHYR_ARCH_ARM_CORE_CORTEX_M_VECTOR_TABLE_H_
#define ZEPHYR_ARCH_ARM_CORE_CORTEX_M_VECTOR_TABLE_H_

#ifdef __cplusplus
extern "C" {
#endif

#ifdef _ASMLANGUAGE

#include <toolchain.h>
Expand Down Expand Up @@ -57,14 +53,18 @@ GTEXT(__reserved)
GTEXT(_PrepC)
GTEXT(_isr_wrapper)

#else
#else /* _ASMLANGUAGE */

extern void *_vector_table[];
#ifdef __cplusplus
extern "C" {
#endif

#endif /* _ASMLANGUAGE */
extern void *_vector_table[];

#ifdef __cplusplus
}
#endif

#endif /* _ASMLANGUAGE */

#endif /* ZEPHYR_ARCH_ARM_CORE_CORTEX_M_VECTOR_TABLE_H_ */
10 changes: 9 additions & 1 deletion arch/arm/core/cortex_r/vector_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,18 @@ GTEXT(__reserved)
GTEXT(_PrepC)
GTEXT(_isr_wrapper)

#else
#else /* _ASMLANGUAGE */

#ifdef __cplusplus
extern "C" {
#endif

extern void *_vector_table[];

#ifdef __cplusplus
}
#endif

#endif /* _ASMLANGUAGE */

#endif /* _VECTOR_TABLE__H_ */
11 changes: 5 additions & 6 deletions arch/arm/include/cortex_m/cmse.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
#ifndef ZEPHYR_ARCH_ARM_INCLUDE_CORTEX_M_CMSE_H_
#define ZEPHYR_ARCH_ARM_INCLUDE_CORTEX_M_CMSE_H_

#ifdef __cplusplus
extern "C" {
#endif

#ifdef _ASMLANGUAGE

/* nothing */
Expand All @@ -27,6 +23,9 @@ extern "C" {
#include <arm_cmse.h>
#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

/*
* Address information retrieval based on the TT instructions.
Expand Down Expand Up @@ -438,10 +437,10 @@ int arm_cmse_addr_range_nonsecure_readwrite_ok(u32_t addr, u32_t size,

#endif /* CONFIG_ARM_SECURE_FIRMWARE */

#endif /* _ASMLANGUAGE */

#ifdef __cplusplus
}
#endif

#endif /* _ASMLANGUAGE */

#endif /* ZEPHYR_ARCH_ARM_INCLUDE_CORTEX_M_CMSE_H_ */
11 changes: 5 additions & 6 deletions arch/arm/include/cortex_m/exc.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@

#include <arch/cpu.h>

#ifdef __cplusplus
extern "C" {
#endif

#ifdef _ASMLANGUAGE

/* nothing */
Expand All @@ -30,6 +26,10 @@ extern "C" {
#include <arch/arm/exc.h>
#include <irq_offload.h>

#ifdef __cplusplus
extern "C" {
#endif

#ifdef CONFIG_IRQ_OFFLOAD
extern volatile irq_offload_routine_t offload_routine;
#endif
Expand Down Expand Up @@ -153,11 +153,10 @@ static ALWAYS_INLINE void z_clearfaults(void)
#endif /* CONFIG_ARMV6_M_ARMV8_M_BASELINE */
}

#endif /* _ASMLANGUAGE */

#ifdef __cplusplus
}
#endif

#endif /* _ASMLANGUAGE */

#endif /* ZEPHYR_ARCH_ARM_INCLUDE_CORTEX_M_EXC_H_ */
12 changes: 6 additions & 6 deletions arch/arm/include/cortex_m/stack.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
#ifndef ZEPHYR_ARCH_ARM_INCLUDE_CORTEX_M_STACK_H_
#define ZEPHYR_ARCH_ARM_INCLUDE_CORTEX_M_STACK_H_

#ifdef __cplusplus
extern "C" {
#endif

#ifdef _ASMLANGUAGE

/* nothing */
Expand All @@ -26,6 +22,10 @@ extern "C" {

#include <arch/arm/cortex_m/cmsis.h>

#ifdef __cplusplus
extern "C" {
#endif

extern K_THREAD_STACK_DEFINE(_interrupt_stack, CONFIG_ISR_STACK_SIZE);

/**
Expand Down Expand Up @@ -63,10 +63,10 @@ static ALWAYS_INLINE void z_InterruptStackSetup(void)
#endif /* CONFIG_STACK_ALIGN_DOUBLE_WORD */
}

#endif /* _ASMLANGUAGE */

#ifdef __cplusplus
}
#endif

#endif /* _ASMLANGUAGE */

#endif /* ZEPHYR_ARCH_ARM_INCLUDE_CORTEX_M_STACK_H_ */
12 changes: 6 additions & 6 deletions arch/arm/include/cortex_m/tz.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
#ifndef ZEPHYR_ARCH_ARM_INCLUDE_CORTEX_M_TZ_H_
#define ZEPHYR_ARCH_ARM_INCLUDE_CORTEX_M_TZ_H_

#ifdef __cplusplus
extern "C" {
#endif

#ifdef _ASMLANGUAGE

/* nothing */
Expand All @@ -27,6 +23,10 @@ extern "C" {
#include <arm_cmse.h>
#include <zephyr/types.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
*
* @brief Initial Non-Secure state configuration
Expand Down Expand Up @@ -334,10 +334,10 @@ typedef void __attribute__((cmse_nonsecure_call)) (*tz_ns_func_ptr_t) (void);
#define TZ_NONSECURE_FUNC_PTR_IS_NS(fptr) \
cmse_is_nsfptr(fptr)

#endif /* _ASMLANGUAGE */

#ifdef __cplusplus
}
#endif

#endif /* _ASMLANGUAGE */

#endif /* ZEPHYR_ARCH_ARM_INCLUDE_CORTEX_M_TZ_H_ */
Loading