summaryrefslogtreecommitdiff
path: root/src/scheduler.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/scheduler.c')
-rw-r--r--src/scheduler.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/scheduler.c b/src/scheduler.c
index cefc5b8c41..a0384e899a 100644
--- a/src/scheduler.c
+++ b/src/scheduler.c
@@ -34,6 +34,7 @@
* issue found by kuronca
* 2010-12-13 Bernard add defunct list initialization even if not use heap.
* 2011-05-10 Bernard clean scheduler debug log.
+ * 2013-12-21 Grissiom add rt_critical_level
*/
#include <rtthread.h>
@@ -398,5 +399,14 @@ void rt_exit_critical(void)
}
}
+/**
+ * Get the scheduler lock level
+ *
+ * @return the level of the scheduler lock. 0 means unlocked.
+ */
+rt_uint16_t rt_critical_level(void)
+{
+ return rt_scheduler_lock_nest;
+}
/*@}*/