fix rt-thread once thread delete
This commit is contained in:
@@ -449,7 +449,7 @@ static void usbh_hubport_enumerate_thread(void *argument)
|
|||||||
usbh_hubport_release(child);
|
usbh_hubport_release(child);
|
||||||
USB_LOG_ERR("Port %u enumerate fail\r\n", child->port);
|
USB_LOG_ERR("Port %u enumerate fail\r\n", child->port);
|
||||||
}
|
}
|
||||||
usb_osal_thread_delete(child->thread);
|
usb_osal_thread_delete(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void usbh_hub_events(struct usbh_hub *hub)
|
static void usbh_hub_events(struct usbh_hub *hub)
|
||||||
|
|||||||
@@ -18,6 +18,10 @@ 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) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
rt_thread_delete(thread);
|
rt_thread_delete(thread);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user