Skip to content

Commit 1aa2d03

Browse files
osal: fix rtthread usb_osal_thread_delete() API (#288)
Signed-off-by: Zhihong Chen <zhihong.chen@hpmicro.com>
1 parent 6769eac commit 1aa2d03

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

osal/usb_osal_rtthread.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ usb_osal_thread_t usb_osal_thread_create(const char *name, uint32_t stack_size,
2626
void usb_osal_thread_delete(usb_osal_thread_t thread)
2727
{
2828
if (thread == NULL) {
29+
rt_thread_t self = rt_thread_self();
30+
rt_thread_control(self, RT_THREAD_CTRL_CLOSE, RT_NULL);
2931
return;
3032
}
3133

0 commit comments

Comments
 (0)