Ver Fonte

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

Signed-off-by: Zhihong Chen <zhihong.chen@hpmicro.com>
chenzhihong007 há 11 meses atrás
pai
commit
1aa2d038aa
1 ficheiros alterados com 2 adições e 0 exclusões
  1. 2 0
      osal/usb_osal_rtthread.c

+ 2 - 0
osal/usb_osal_rtthread.c

@@ -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)
 {
     if (thread == NULL) {
+        rt_thread_t self = rt_thread_self();
+        rt_thread_control(self, RT_THREAD_CTRL_CLOSE, RT_NULL);
         return;
     }