From 3b1d4e9222f5a7f3f3d65f90d7fe8de4a9abaf4e Mon Sep 17 00:00:00 2001 From: Rui <1413577909@qq.com> Date: Wed, 26 Jun 2024 23:25:23 +0800 Subject: [PATCH] fix Compilation error in "driver.c", "completion_up.c", "syslog.c" and "dlmodule.c". (#9093) --- components/drivers/core/driver.c | 2 +- components/drivers/ipc/completion_up.c | 1 - components/libc/posix/libdl/dlmodule.c | 6 +++--- components/utilities/ulog/syslog/syslog.c | 2 +- components/utilities/ulog/ulog.h | 2 ++ 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/components/drivers/core/driver.c b/components/drivers/core/driver.c index 64b9d5610c..11a92abd86 100644 --- a/components/drivers/core/driver.c +++ b/components/drivers/core/driver.c @@ -50,4 +50,4 @@ rt_err_t rt_driver_unregister(rt_driver_t drv) return ret; } -RTM_EXPORT(rt_driver_register); +RTM_EXPORT(rt_driver_unregister); diff --git a/components/drivers/ipc/completion_up.c b/components/drivers/ipc/completion_up.c index 6f89d92e03..5c8e546687 100644 --- a/components/drivers/ipc/completion_up.c +++ b/components/drivers/ipc/completion_up.c @@ -147,7 +147,6 @@ __exit: return result; } -RTM_EXPORT(rt_completion_wait); /** * @brief This function indicates a completion has done and wakeup the thread diff --git a/components/libc/posix/libdl/dlmodule.c b/components/libc/posix/libdl/dlmodule.c index 2679296731..0d05190f7f 100644 --- a/components/libc/posix/libdl/dlmodule.c +++ b/components/libc/posix/libdl/dlmodule.c @@ -128,8 +128,8 @@ static void _dlmodule_exit(void) rt_thread_t thread = (rt_thread_t)object; /* stop timer and suspend thread*/ - if ((thread->stat & RT_THREAD_STAT_MASK) != RT_THREAD_CLOSE && - (thread->stat & RT_THREAD_STAT_MASK) != RT_THREAD_INIT) + if ((RT_SCHED_CTX(thread).stat & RT_THREAD_STAT_MASK) != RT_THREAD_CLOSE && + (RT_SCHED_CTX(thread).stat & RT_THREAD_STAT_MASK) != RT_THREAD_INIT) { rt_timer_stop(&(thread->thread_timer)); rt_thread_suspend(thread); @@ -770,7 +770,7 @@ void dlmodule_exit(int ret_code) /* the stat of module was changed to CLOSING in _dlmodule_exit */ thread = module->main_thread; - if ((thread->stat & RT_THREAD_STAT_MASK) == RT_THREAD_CLOSE) + if ((RT_SCHED_CTX(thread).stat & RT_THREAD_STAT_MASK) == RT_THREAD_CLOSE) { /* main thread already closed */ rt_exit_critical(); diff --git a/components/utilities/ulog/syslog/syslog.c b/components/utilities/ulog/syslog/syslog.c index 213379ee4b..b5b32d0b9d 100644 --- a/components/utilities/ulog/syslog/syslog.c +++ b/components/utilities/ulog/syslog/syslog.c @@ -94,7 +94,7 @@ void vsyslog(int priority, const char *format, va_list args) priority |= local_facility; } - ulog_voutput(priority, local_ident, RT_TRUE, format, args); + ulog_voutput(priority, local_ident, RT_TRUE, RT_NULL, 0, 0, 0, format, args); } /** diff --git a/components/utilities/ulog/ulog.h b/components/utilities/ulog/ulog.h index 63174ec2e2..1e0353d121 100644 --- a/components/utilities/ulog/ulog.h +++ b/components/utilities/ulog/ulog.h @@ -92,6 +92,8 @@ void ulog_hexdump(const char *tag, rt_size_t width, const rt_uint8_t *buf, rt_si /* * Another log output API. This API is more difficult to use than LOG_X API. */ +void ulog_voutput(rt_uint32_t level, const char *tag, rt_bool_t newline, const rt_uint8_t *hex_buf, + rt_size_t hex_size, rt_size_t hex_width, rt_base_t hex_addr, const char *format, va_list args); void ulog_output(rt_uint32_t level, const char *tag, rt_bool_t newline, const char *format, ...); void ulog_raw(const char *format, ...);