1/* 2 * Copyright (c) 2014-2015 Wind River Systems, Inc. 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7/** 8 * @file 9 * @brief Wrapper for z_thread_entry 10 * 11 * Wrapper for z_thread_entry routine when called from the initial context. 12 */ 13 14#include <toolchain.h> 15#include <linker/sections.h> 16#include <v2/irq.h> 17#include <arch/arc/asm-compat/assembler.h> 18 19GTEXT(z_thread_entry_wrapper) 20GTEXT(z_thread_entry_wrapper1) 21 22/* 23 * @brief Wrapper for z_thread_entry 24 * 25 * The routine pops parameters for the z_thread_entry from stack frame, prepared 26 * by the arch_new_thread() routine. 27 * 28 * @return N/A 29 */ 30 31SECTION_FUNC(TEXT, z_thread_entry_wrapper) 32 seti _ARC_V2_INIT_IRQ_LOCK_KEY 33z_thread_entry_wrapper1: 34 POPR r3 35 POPR r2 36 POPR r1 37 POPR r0 38 j z_thread_entry 39 nop 40