osal: fix rtthread usb_osal_thread_delete() API (#288)

Signed-off-by: Zhihong Chen <zhihong.chen@hpmicro.com>
This commit is contained in:
chenzhihong007
2025-01-22 10:28:55 +08:00
committed by GitHub
parent 6769eac6e0
commit 1aa2d038aa

View File

@@ -26,6 +26,8 @@ usb_osal_thread_t usb_osal_thread_create(const char *name, uint32_t stack_size,
void usb_osal_thread_delete(usb_osal_thread_t thread) void usb_osal_thread_delete(usb_osal_thread_t thread)
{ {
if (thread == NULL) { if (thread == NULL) {
rt_thread_t self = rt_thread_self();
rt_thread_control(self, RT_THREAD_CTRL_CLOSE, RT_NULL);
return; return;
} }