mirror of https://github.com/RT-Thread/rt-thread
解决rt_hw_context_switch_interrupt形参定义不一致
Signed-off-by: latercomer <latercomer@qq.com>
This commit is contained in:
parent
9e13f67018
commit
130b5ba653
|
@ -45,6 +45,7 @@
|
|||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
|
||||
<LanguageStandard_C>stdc11</LanguageStandard_C>
|
||||
<TreatSpecificWarningsAsErrors>4029</TreatSpecificWarningsAsErrors>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>winmm.lib;Packet.lib;wpcap.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
|
|
|
@ -97,8 +97,9 @@ static MMRESULT OSTick_TimerID;
|
|||
/*
|
||||
* flag in interrupt handling
|
||||
*/
|
||||
rt_uint32_t rt_interrupt_from_thread, rt_interrupt_to_thread;
|
||||
rt_uint32_t rt_thread_switch_interrupt_flag;
|
||||
volatile rt_ubase_t rt_interrupt_from_thread = 0;
|
||||
volatile rt_ubase_t rt_interrupt_to_thread = 0;
|
||||
volatile rt_uint32_t rt_thread_switch_interrupt_flag = 0;
|
||||
|
||||
/*
|
||||
*********************************************************************************************************
|
||||
|
@ -248,18 +249,17 @@ void rt_hw_interrupt_enable(rt_base_t level)
|
|||
* Note(s) : none
|
||||
*********************************************************************************************************
|
||||
*/
|
||||
void rt_hw_context_switch_interrupt(rt_uint32_t from,
|
||||
rt_uint32_t to)
|
||||
void rt_hw_context_switch_interrupt(rt_ubase_t from, rt_ubase_t to, rt_thread_t from_thread, rt_thread_t to_thread)
|
||||
{
|
||||
if(rt_thread_switch_interrupt_flag != 1)
|
||||
{
|
||||
rt_thread_switch_interrupt_flag = 1;
|
||||
|
||||
// set rt_interrupt_from_thread
|
||||
rt_interrupt_from_thread = *((rt_uint32_t *)(from));
|
||||
rt_interrupt_from_thread = from;
|
||||
}
|
||||
|
||||
rt_interrupt_to_thread = *((rt_uint32_t *)(to));
|
||||
rt_interrupt_to_thread = to;
|
||||
|
||||
//trigger YIELD exception(cause context switch)
|
||||
TriggerSimulateInterrupt(CPU_INTERRUPT_YIELD);
|
||||
|
|
Loading…
Reference in New Issue