diff options
| author | Grissiom <[email protected]> | 2013-12-21 11:24:37 +0800 |
|---|---|---|
| committer | Grissiom <[email protected]> | 2013-12-21 11:27:26 +0800 |
| commit | 408ac34bc2d762db7019a14cc5caf8af4df57b43 (patch) | |
| tree | f42003d993d5b3706acadf745772165fbc449c9b /include/rtthread.h | |
| parent | ca270a46678b8de14fc23b2851ef84d265f29268 (diff) | |
kernel: add rt_critical_level that return the lock count of scheduler
Out side world may be interested in whether the scheduler is locked or
not. Provide an API to tell that.
Diffstat (limited to 'include/rtthread.h')
| -rw-r--r-- | include/rtthread.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/rtthread.h b/include/rtthread.h index b68a301a5c..0891ed9bcc 100644 --- a/include/rtthread.h +++ b/include/rtthread.h @@ -173,6 +173,7 @@ void rt_schedule_remove_thread(struct rt_thread *thread); void rt_enter_critical(void); void rt_exit_critical(void); +rt_uint16_t rt_critical_level(void); #ifdef RT_USING_HOOK void rt_scheduler_sethook(void (*hook)(rt_thread_t from, rt_thread_t to)); |
