diff options
| author | Shell <[email protected]> | 2024-01-09 20:37:47 +0800 |
|---|---|---|
| committer | Meco Man <[email protected]> | 2024-01-16 00:59:18 +0800 |
| commit | f6fce5f8d76e26c2315a64de81ce07bd6e379394 (patch) | |
| tree | eec5650cafe081bdfff1933f0926c0cc1b6548a9 /include | |
| parent | 447a22a21dc6da2bcbe7489ae08c9d0e18308511 (diff) | |
[kservice] MT-safe output support (kprintf/kputs)
Signed-off-by: Shell <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/rtthread.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/rtthread.h b/include/rtthread.h index 7ccf3b56c6..6f476a0008 100644 --- a/include/rtthread.h +++ b/include/rtthread.h @@ -707,6 +707,11 @@ int rt_snprintf(char *buf, rt_size_t size, const char *format, ...); #if defined(RT_USING_DEVICE) && defined(RT_USING_CONSOLE) rt_device_t rt_console_set_device(const char *name); rt_device_t rt_console_get_device(void); +#ifdef RT_USING_THREDSAFE_PRINTF + rt_thread_t rt_console_current_user(void); +#else + rt_inline void *rt_console_current_user(void) { return RT_NULL; } +#endif /* RT_USING_THREDSAFE_PRINTF */ #endif /* defined(RT_USING_DEVICE) && defined(RT_USING_CONSOLE) */ rt_err_t rt_get_errno(void); |
