Skip to content

Commit

Permalink
[ipc] [dataqueue] 修复队列 pop 挂起的线程 push 无法恢复运行的错误
Browse files Browse the repository at this point in the history
队列在 push 后查找挂起列表时使用了错误的挂起列表。
  • Loading branch information
sp-cai committed Apr 22, 2024
1 parent e50f064 commit 127b760
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/drivers/ipc/dataqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion include/rttypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 127b760

Please sign in to comment.