Browse Source

修正: futex唤醒过程中,从等待队列移除时应该使用thread->tlist成员

shaojinchun 5 năm trước cách đây
mục cha
commit
234f79f6b0
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      components/lwp/lwp_futex.c

+ 1 - 1
components/lwp/lwp_futex.c

@@ -156,7 +156,7 @@ void futex_wake(struct rt_futex *futex, int number)
 
         thread = rt_list_entry(futex->waiting_thread.next, struct rt_thread, tlist);
         /* remove from waiting list */
-        rt_list_remove(&(thread->list));
+        rt_list_remove(&(thread->tlist));
 
         thread->error = RT_EOK;
         /* resume the suspended thread */