anchao commented on code in PR #13341:
URL: https://github.com/apache/nuttx/pull/13341#discussion_r1751092302
##########
sched/sched/sched_addreadytorun.c:
##########
@@ -152,30 +152,14 @@ bool nxsched_add_readytorun(FAR struct tcb_s *btcb)
bool nxsched_add_readytorun(FAR struct tcb_s *btcb)
{
FAR struct tcb_s *rtcb;
+ FAR struct tcb_s *headtcb;
FAR dq_queue_t *tasklist;
bool doswitch;
int task_state;
int cpu;
int me;
- /* Check if the blocked TCB is locked to this CPU */
-
- if ((btcb->flags & TCB_FLAG_CPU_LOCKED) != 0)
Review Comment:
So you are allowing users to change the idle affinity via sched_setaffinity?
##########
include/nuttx/queue.h:
##########
@@ -107,6 +107,17 @@
} \
while (0)
+#define dq_addfirst_notempty(p, q) \
Review Comment:
Do not expose this type of API to users, this will confuse developers who
read the API and cause serious issues if misused. you can implement it in your
code privately for performance version
##########
include/nuttx/queue.h:
##########
@@ -226,6 +237,27 @@
} \
while (0)
+#define dq_rem_head(p, q) \
Review Comment:
ditto
##########
include/nuttx/queue.h:
##########
@@ -226,6 +237,27 @@
} \
while (0)
+#define dq_rem_head(p, q) \
+ do \
+ { \
+ FAR dq_entry_t *tmp_node = (p); \
+ FAR dq_entry_t *tmp_next = tmp_node->flink; \
+ (q)->head = tmp_next; \
+ tmp_next->blink = NULL; \
+ tmp_node->flink = NULL; \
+ } \
+ while (0)
+
+#define dq_rem_mid(p) \
Review Comment:
ditto
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]