MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / rt_hw_context_switch

Function rt_hw_context_switch

libcpu/rx/cpuport.c:146–156  ·  view source on GitHub ↗

* switch thread in interrupt * * @author LXZ (2014/11/8) * * @param rt_uint32_t from * @param rt_uint32_t to */

Source from the content-addressed store, hash-verified

144 * @param rt_uint32_t to
145 */
146void rt_hw_context_switch(rt_uint32_t from, rt_uint32_t to)
147{
148 if (rt_thread_switch_interrupt_flag == 0)
149 {
150 rt_thread_switch_interrupt_flag = 1;
151 rt_interrupt_from_thread = from;
152 }
153
154 rt_interrupt_to_thread = to;
155 ENTER_INTERRUPT();
156}
157/**
158 * switch thread out the interrupt
159 *

Callers 3

rt_scheduleFunction · 0.50
rt_scheduleFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected