Sfoglia il codice sorgente

修正tid相关代码一处没有改全的问题

shaojinchun 5 anni fa
parent
commit
38cdd432ad
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      components/lwp/lwp_tid.c

+ 1 - 1
components/lwp/lwp_tid.c

@@ -77,7 +77,7 @@ rt_thread_t lwp_tid_get_thread(int tid)
     {
         thread = lwp_tid_ary[tid];
         if ((thread >= (rt_thread_t)lwp_tid_ary)
-                && (thread < (rt_thread_t)(lwp_tid_ary + LWP_TID_MAX_NR + 1)))
+                && (thread < (rt_thread_t)(lwp_tid_ary + LWP_TID_MAX_NR)))
         {
             /* the tid is not used */
             thread = RT_NULL;