mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 11:26:12 +08:00
sched/signal: use list_waitingforsignal() to access g_waitingforsignal
Replace direct access to the g_waitingforsignal list with the
NuttX-defined macro list_waitingforsignal() to improve code
consistency and maintainability.
Signed-off-by: Chengdong Wang wangchengdong@lixiang.com
This commit is contained in:
committed by
Alan C. Assis
parent
4bdd33a035
commit
97db9a499c
@@ -131,7 +131,7 @@ void nxsched_ticksleep(unsigned int ticks)
|
|||||||
/* Add the task to the specified blocked task list */
|
/* Add the task to the specified blocked task list */
|
||||||
|
|
||||||
rtcb->task_state = TSTATE_WAIT_SIG;
|
rtcb->task_state = TSTATE_WAIT_SIG;
|
||||||
dq_addlast((FAR dq_entry_t *)rtcb, &g_waitingforsignal);
|
dq_addlast((FAR dq_entry_t *)rtcb, list_waitingforsignal());
|
||||||
|
|
||||||
/* Now, perform the context switch if one is needed */
|
/* Now, perform the context switch if one is needed */
|
||||||
|
|
||||||
|
|||||||
@@ -320,7 +320,7 @@ int nxsig_clockwait(int clockid, int flags,
|
|||||||
/* Add the task to the specified blocked task list */
|
/* Add the task to the specified blocked task list */
|
||||||
|
|
||||||
rtcb->task_state = TSTATE_WAIT_SIG;
|
rtcb->task_state = TSTATE_WAIT_SIG;
|
||||||
dq_addlast((FAR dq_entry_t *)rtcb, &g_waitingforsignal);
|
dq_addlast((FAR dq_entry_t *)rtcb, list_waitingforsignal());
|
||||||
|
|
||||||
/* Now, perform the context switch if one is needed */
|
/* Now, perform the context switch if one is needed */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user