Messages in this thread | | | Date | Mon, 3 Oct 2022 06:57:37 -1000 | From | Tejun Heo <> | Subject | Re: [PATCH v7 1/3] llist: Add a lock-less list variant terminated by a sentinel node |
| |
On Mon, Oct 03, 2022 at 12:55:24PM -0400, Waiman Long wrote: > That was my original plan. However, after looking at some existing users of > lockless list, they have coded in the dependency on the fact that a lockless > list is empty if it is NULL. I guess I can make this true also for the new > lockless list with sentinel at the expense of a bit more overhead in the > entry insertion path and deletion path. I will take a further look at that.
There aren't that many users of llist. Maybe it'd be easier / cleaner to introduce a macro to test whether a llist is empty and replace the NULL tests?
Thanks.
-- tejun
| |