fix Compilation error in "driver.c", "completion_up.c", "syslog.c" and "dlmodule.c". (#9093)

This commit is contained in:
Rui 2024-06-26 23:25:23 +08:00 committed by GitHub
parent 071b3d9244
commit 3b1d4e9222
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 7 additions and 6 deletions

View File

@ -50,4 +50,4 @@ rt_err_t rt_driver_unregister(rt_driver_t drv)
return ret; return ret;
} }
RTM_EXPORT(rt_driver_register); RTM_EXPORT(rt_driver_unregister);

View File

@ -147,7 +147,6 @@ __exit:
return result; return result;
} }
RTM_EXPORT(rt_completion_wait);
/** /**
* @brief This function indicates a completion has done and wakeup the thread * @brief This function indicates a completion has done and wakeup the thread

View File

@ -128,8 +128,8 @@ static void _dlmodule_exit(void)
rt_thread_t thread = (rt_thread_t)object; rt_thread_t thread = (rt_thread_t)object;
/* stop timer and suspend thread*/ /* stop timer and suspend thread*/
if ((thread->stat & RT_THREAD_STAT_MASK) != RT_THREAD_CLOSE && if ((RT_SCHED_CTX(thread).stat & RT_THREAD_STAT_MASK) != RT_THREAD_CLOSE &&
(thread->stat & RT_THREAD_STAT_MASK) != RT_THREAD_INIT) (RT_SCHED_CTX(thread).stat & RT_THREAD_STAT_MASK) != RT_THREAD_INIT)
{ {
rt_timer_stop(&(thread->thread_timer)); rt_timer_stop(&(thread->thread_timer));
rt_thread_suspend(thread); 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 */ /* the stat of module was changed to CLOSING in _dlmodule_exit */
thread = module->main_thread; 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 */ /* main thread already closed */
rt_exit_critical(); rt_exit_critical();

View File

@ -94,7 +94,7 @@ void vsyslog(int priority, const char *format, va_list args)
priority |= local_facility; 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);
} }
/** /**

View File

@ -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. * 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_output(rt_uint32_t level, const char *tag, rt_bool_t newline, const char *format, ...);
void ulog_raw(const char *format, ...); void ulog_raw(const char *format, ...);