From 3ebc76652197b47e117ed2a856786a4d199d79a7 Mon Sep 17 00:00:00 2001 From: Grissiom Date: Wed, 4 Sep 2013 00:05:03 +0800 Subject: [PATCH] sim/posix: move rt_hw_context_switch_interrupt after it's definition This fix a compile error in Clang. --- libcpu/sim/posix/cpu_port.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libcpu/sim/posix/cpu_port.c b/libcpu/sim/posix/cpu_port.c index e094edb6b..eb1ae4865 100644 --- a/libcpu/sim/posix/cpu_port.c +++ b/libcpu/sim/posix/cpu_port.c @@ -363,12 +363,6 @@ void rt_hw_interrupt_enable(rt_base_t level) /*TODO: It may need to unmask the signal */ } -void rt_hw_context_switch_interrupt(rt_uint32_t from, - rt_uint32_t to) -{ - rt_hw_context_switch(from, to); -} - void rt_hw_context_switch(rt_uint32_t from, rt_uint32_t to) { @@ -400,6 +394,12 @@ void rt_hw_context_switch(rt_uint32_t from, pthread_mutex_unlock(ptr_int_mutex); } +void rt_hw_context_switch_interrupt(rt_uint32_t from, + rt_uint32_t to) +{ + rt_hw_context_switch(from, to); +} + void rt_hw_context_switch_to(rt_uint32_t to) { //set to thread