Official mbed Real Time Operating System based on the RTX implementation of the CMSIS-RTOS API open standard.
Dependents: denki-yohou_b TestY201 Network-RTOS NTPClient_HelloWorld ... more
Deprecated
This is the mbed 2 rtos library. mbed OS 5 integrates the mbed library with mbed-rtos. With this, we have provided thread safety for all mbed APIs. If you'd like to learn about using mbed OS 5, please see the docs.
Diff: rtos/Thread.cpp
- Revision:
- 107:bdd541595fc5
- Parent:
- 90:21b438192b0f
- Child:
- 112:53ace74b190c
diff -r dfc27975e193 -r bdd541595fc5 rtos/Thread.cpp
--- a/rtos/Thread.cpp Wed Mar 02 11:30:15 2016 +0000
+++ b/rtos/Thread.cpp Tue Mar 15 09:00:39 2016 +0000
@@ -22,6 +22,7 @@
#include "Thread.h"
#include "mbed_error.h"
+#include "rtos_idle.h"
namespace rtos {
@@ -132,6 +133,10 @@
return osThreadGetId();
}
+void Thread::attach_idle_hook(void (*fptr)(void)) {
+ rtos_attach_idle_hook(fptr);
+}
+
Thread::~Thread() {
terminate();
if (_dynamic_stack) {
mbed official




