2015-04-11 07:44:37 +08:00
|
|
|
/*
|
2015-08-20 23:04:01 +08:00
|
|
|
* Copyright (c) 2014-2015 Wind River Systems, Inc.
|
2015-04-11 07:44:37 +08:00
|
|
|
*
|
2017-01-19 09:01:01 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2015-04-11 07:44:37 +08:00
|
|
|
*/
|
|
|
|
|
2015-12-04 23:09:39 +08:00
|
|
|
/**
|
|
|
|
* @file
|
2019-03-09 05:19:05 +08:00
|
|
|
* @brief Wrapper for z_thread_entry
|
2015-12-04 23:09:39 +08:00
|
|
|
*
|
2019-03-09 05:19:05 +08:00
|
|
|
* Wrapper for z_thread_entry routine when called from the initial context.
|
2015-04-11 07:44:37 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <toolchain.h>
|
2017-06-17 23:30:47 +08:00
|
|
|
#include <linker/sections.h>
|
2019-06-13 17:21:52 +08:00
|
|
|
#include <v2/irq.h>
|
2015-04-11 07:44:37 +08:00
|
|
|
|
2019-03-14 23:20:46 +08:00
|
|
|
GTEXT(z_thread_entry_wrapper)
|
2019-06-13 17:21:52 +08:00
|
|
|
GTEXT(z_thread_entry_wrapper1)
|
2015-04-11 07:44:37 +08:00
|
|
|
|
|
|
|
/*
|
2019-03-09 05:19:05 +08:00
|
|
|
* @brief Wrapper for z_thread_entry
|
2015-04-11 07:44:37 +08:00
|
|
|
*
|
2019-03-09 05:19:05 +08:00
|
|
|
* The routine pops parameters for the z_thread_entry from stack frame, prepared
|
|
|
|
* by the z_new_thread() routine.
|
2015-04-11 07:44:37 +08:00
|
|
|
*
|
2015-07-02 05:29:04 +08:00
|
|
|
* @return N/A
|
2015-04-11 07:44:37 +08:00
|
|
|
*/
|
|
|
|
|
2019-03-14 23:20:46 +08:00
|
|
|
SECTION_FUNC(TEXT, z_thread_entry_wrapper)
|
2019-06-13 17:21:52 +08:00
|
|
|
seti _ARC_V2_INIT_IRQ_LOCK_KEY
|
|
|
|
z_thread_entry_wrapper1:
|
2015-04-11 07:44:37 +08:00
|
|
|
pop_s r3
|
|
|
|
pop_s r2
|
|
|
|
pop_s r1
|
|
|
|
pop_s r0
|
2019-03-09 05:19:05 +08:00
|
|
|
j z_thread_entry
|
2015-04-11 07:44:37 +08:00
|
|
|
nop
|