diff options
Diffstat (limited to 'os/kernel/src')
-rw-r--r-- | os/kernel/src/chsys.c | 3 | ||||
-rw-r--r-- | os/kernel/src/chthreads.c | 8 |
2 files changed, 9 insertions, 2 deletions
diff --git a/os/kernel/src/chsys.c b/os/kernel/src/chsys.c index d34e7e73a..22860b317 100644 --- a/os/kernel/src/chsys.c +++ b/os/kernel/src/chsys.c @@ -117,6 +117,9 @@ void chSysTimerHandlerI(void) { currp->p_time++;
#endif
chVTDoTickI();
+#if defined(SYSTEM_TICK_EVENT_HOOK)
+ SYSTEM_TICK_EVENT_HOOK();
+#endif
}
#if CH_USE_NESTED_LOCKS && !CH_OPTIMIZE_SPEED
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));
|