mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-29 10:30:24 +00:00
[smart] select console device dynamically (#8949)
* [smart] select console device dynamically - Fixed compiler warning on terminal subsystem for `components/lwp/terminal/terminal.h` - Updated default console setup to dynamically select an appropriate tty device based on the configured console device name. Signed-off-by: Shell <smokewood@qq.com> * fixup: remove useless codes --------- Signed-off-by: Shell <smokewood@qq.com>
This commit is contained in:
@@ -212,9 +212,8 @@ void tty_rel_gone(struct lwp_tty *tp);
|
||||
#define tty_lock_notrecused(tp) (rt_mutex_get_hold(tty_getlock(tp)) == 1)
|
||||
#define tty_assert_locked(tp) RT_ASSERT(tty_lock_owned(tp))
|
||||
#define tty_lock_assert(tp, option) \
|
||||
(((option) == (MA_OWNED | MA_NOTRECURSED)) \
|
||||
? (tty_lock_owned(tp) && tty_lock_notrecused(tp)) \
|
||||
: rt_assert_handler("Operation not allowed", __func__, __LINE__))
|
||||
RT_ASSERT(((option) == (MA_OWNED | MA_NOTRECURSED)) && \
|
||||
(tty_lock_owned(tp) && tty_lock_notrecused(tp)))
|
||||
|
||||
/* System messages. */
|
||||
int tty_checkoutq(struct lwp_tty *tp);
|
||||
|
||||
Reference in New Issue
Block a user