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
|
|
|
|
* @brief Wrapper for _thread_entry
|
|
|
|
*
|
2015-08-20 23:04:01 +08:00
|
|
|
* Wrapper for _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>
|
2015-04-11 07:44:37 +08:00
|
|
|
|
2015-08-20 23:04:01 +08:00
|
|
|
GTEXT(_thread_entry_wrapper)
|
|
|
|
GTEXT(_thread_entry)
|
2015-04-11 07:44:37 +08:00
|
|
|
|
|
|
|
/*
|
2015-08-20 23:04:01 +08:00
|
|
|
* @brief Wrapper for _thread_entry
|
2015-04-11 07:44:37 +08:00
|
|
|
*
|
2015-08-20 23:04:01 +08:00
|
|
|
* The routine pops parameters for the _thread_entry from stack frame, prepared
|
|
|
|
* by the _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
|
|
|
*/
|
|
|
|
|
2015-08-20 23:04:01 +08:00
|
|
|
SECTION_FUNC(TEXT, _thread_entry_wrapper)
|
2015-04-11 07:44:37 +08:00
|
|
|
|
|
|
|
pop_s r3
|
|
|
|
pop_s r2
|
|
|
|
pop_s r1
|
|
|
|
pop_s r0
|
2015-08-20 23:04:01 +08:00
|
|
|
j _thread_entry
|
2015-04-11 07:44:37 +08:00
|
|
|
nop
|