diff options
| author | latercomer <[email protected]> | 2025-03-16 16:26:21 +0800 |
|---|---|---|
| committer | Rbb666 <[email protected]> | 2025-03-17 16:45:59 +0800 |
| commit | 130b5ba653871dcf49ce61d21279527f8d3b64eb (patch) | |
| tree | ba45b837910f2af39bea817a64e047a8cf199f8b /libcpu/sim | |
| parent | 9e13f67018d6bd2af6c005974c69571289ad6503 (diff) | |
解决rt_hw_context_switch_interrupt形参定义不一致
Signed-off-by: latercomer <[email protected]>
Diffstat (limited to 'libcpu/sim')
| -rw-r--r-- | libcpu/sim/win32/cpu_port.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libcpu/sim/win32/cpu_port.c b/libcpu/sim/win32/cpu_port.c index 6b7da50bf4..15d0218f03 100644 --- a/libcpu/sim/win32/cpu_port.c +++ b/libcpu/sim/win32/cpu_port.c @@ -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); |
