summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhichard <[email protected]>2019-11-16 11:20:13 +0800
committerhichard <[email protected]>2019-11-16 11:20:13 +0800
commitec3b4349d30249c1dfd64af19df3af82307ec2dc (patch)
treef86f16887433ece993f7c8269ab627b7fbb00aea /src
parentaafed7b43455d6e2d66d5e36e8f3d849b677e195 (diff)
parent97b7661f6ef902db9b5bc92d384f2944433d0e8f (diff)
Merge branch 'master' of https://github.com/RT-Thread/rt-thread into renhaibo-branch
Diffstat (limited to 'src')
-rw-r--r--src/thread.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/thread.c b/src/thread.c
index bee5f0c2c0..c5f75a1176 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -107,11 +107,11 @@ void rt_thread_exit(void)
rt_list_insert_after(&rt_thread_defunct, &(thread->tlist));
}
- /* enable interrupt */
- rt_hw_interrupt_enable(level);
-
/* switch to next task */
rt_schedule();
+
+ /* enable interrupt */
+ rt_hw_interrupt_enable(level);
}
static rt_err_t _rt_thread_init(struct rt_thread *thread,