From 285fee9d4cb6647148476bbdd3bf0796f9e3c6f9 Mon Sep 17 00:00:00 2001 From: Shell Date: Thu, 31 Oct 2024 11:56:23 +0800 Subject: feat: rtatomic: lockless single linked list Signed-off-by: Shell --- include/rttypes.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/rttypes.h') diff --git a/include/rttypes.h b/include/rttypes.h index 0b614a492a..75bf58d52f 100644 --- a/include/rttypes.h +++ b/include/rttypes.h @@ -132,6 +132,15 @@ struct rt_slist_node }; typedef struct rt_slist_node rt_slist_t; /**< Type for single list. */ +/** + * Lock-less Single List structure + */ +struct rt_lockless_slist_node +{ + rt_atomic_t next; /**< point to next node. */ +}; +typedef struct rt_lockless_slist_node rt_ll_slist_t; /**< Type for lock-les single list. */ + /** * Spinlock */ -- cgit v1.3.1