diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-08-21 08:38:14 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-08-21 08:38:14 +0000 |
commit | 138c0f900d823b2c953038048bc40b14610f958a (patch) | |
tree | 6c446a2ec08cba09ac2345dbb9b708139e3e1c85 /os/kernel/src/chthreads.c | |
parent | 29226ecec7052b72ba82e8ba2eedb4c91d27ff28 (diff) | |
download | ChibiOS-138c0f900d823b2c953038048bc40b14610f958a.tar.gz ChibiOS-138c0f900d823b2c953038048bc40b14610f958a.tar.bz2 ChibiOS-138c0f900d823b2c953038048bc40b14610f958a.zip |
Added new kernel hooks (on halt and on systick).
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2136 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel/src/chthreads.c')
-rw-r--r-- | os/kernel/src/chthreads.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/os/kernel/src/chthreads.c b/os/kernel/src/chthreads.c index 3f2f88899..ae38dc11a 100644 --- a/os/kernel/src/chthreads.c +++ b/os/kernel/src/chthreads.c @@ -94,7 +94,9 @@ Thread *init_thread(Thread *tp, tprio_t prio) { #if CH_USE_EVENTS
tp->p_epending = 0;
#endif
- THREAD_EXT_INIT(tp);
+#if defined(THREAD_EXT_EXIT_HOOK)
+ THREAD_EXT_INIT_HOOK(tp);
+#endif
return tp;
}
@@ -357,7 +359,9 @@ void chThdExit(msg_t msg) { chSysLock();
tp->p_u.exitcode = msg;
- THREAD_EXT_EXIT(tp);
+#if defined(THREAD_EXT_EXIT_HOOK)
+ THREAD_EXT_EXIT_HOOK(tp);
+#endif
#if CH_USE_WAITEXIT
while (notempty(&tp->p_waiting))
chSchReadyI(list_remove(&tp->p_waiting));
|