| 270 | } |
| 271 | |
| 272 | static void _console_release(void) |
| 273 | { |
| 274 | rt_ubase_t level = rt_spin_lock_irqsave(&_syscon_lock); |
| 275 | rt_thread_t self_thread = rt_thread_self(); |
| 276 | RT_UNUSED(self_thread); |
| 277 | |
| 278 | RT_ASSERT(_pr_curr_user == self_thread); |
| 279 | |
| 280 | _pr_curr_user_nested--; |
| 281 | if (!_pr_curr_user_nested) |
| 282 | { |
| 283 | _pr_curr_user = RT_NULL; |
| 284 | |
| 285 | #ifdef RT_USING_DEBUG |
| 286 | rt_exit_critical_safe(_syscon_lock.critical_level); |
| 287 | _syscon_lock.critical_level = _pr_critical_level; |
| 288 | #else |
| 289 | rt_exit_critical(); |
| 290 | #endif |
| 291 | } |
| 292 | rt_spin_unlock_irqrestore(&_syscon_lock, level); |
| 293 | } |
| 294 | |
| 295 | #define CONSOLE_TAKE _console_take() |
| 296 | #define CONSOLE_RELEASE _console_release() |
nothing calls this directly
no test coverage detected