Maintain legacy RTOS behavior before mbed-5

Fork of mbed-rtos by mbed official

Revision:
107:bdd541595fc5
Parent:
90:21b438192b0f
Child:
112:53ace74b190c
--- 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) {