瀏覽代碼

[ipc] [dataqueue] 修复队列 pop 挂起的线程 push 无法恢复运行的错误 (#8839)

队列在 push 后查找挂起列表时使用了错误的挂起列表。
sp-cai 1 年之前
父節點
當前提交
554632f1ee
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      components/drivers/ipc/dataqueue.c
  2. 1 1
      include/rttypes.h

+ 1 - 1
components/drivers/ipc/dataqueue.c

@@ -165,7 +165,7 @@ rt_err_t rt_data_queue_push(struct rt_data_queue *queue,
     }
 
     /* there is at least one thread in suspended list */
-    if (rt_susp_list_dequeue(&queue->suspended_push_list,
+    if (rt_susp_list_dequeue(&queue->suspended_pop_list,
                              RT_THREAD_RESUME_RES_THR_ERR))
     {
         /* unlock and perform a schedule */

+ 1 - 1
include/rttypes.h

@@ -33,7 +33,7 @@ extern "C" {
  */
 
 typedef int                             rt_bool_t;      /**< boolean type */
-typedef signed long                     rt_base_t;      /**< Nbit CPU related date type */
+typedef signed long                     rt_base_t;      /**< Nbit CPU related data type */
 typedef unsigned long                   rt_ubase_t;     /**< Nbit unsigned CPU related data type */
 
 #ifndef RT_USING_ARCH_DATA_TYPE