Messages in this thread | | | Date | Tue, 27 Oct 2020 10:07:47 +0800 (CST) | From | 苏辉 <> | Subject | Re:Re: [PATCH] sched/rt.c: use list_is_singular() instead of '->prev != ->next' |
| |
>Perhaps there should be a list_has_more_than_one() API, as list_is_singular >requires two checks, and the "more_than_one" only requires a single check. > >list_is_singular() is: > > return !list_empty(list) && (list->next == list->prev); > > >which is more work than what you are replacing. >
Hi, Steve:
Thanks for your explanation. Maybe we should add another api called "list_more_than_one" just without list_empty() check.
I will send PATCH V2 later.
Thank. | |