summaryrefslogtreecommitdiff
path: root/include/rttypes.h
diff options
context:
space:
mode:
authorShell <[email protected]>2024-10-31 11:56:23 +0800
committerRbb666 <[email protected]>2024-11-03 10:08:45 +0800
commit285fee9d4cb6647148476bbdd3bf0796f9e3c6f9 (patch)
treed3a4a2dbe731d0ba2a96801f9a2d589a78d29555 /include/rttypes.h
parent40cd8cce995e24ea265664c5db127c662a747032 (diff)
feat: rtatomic: lockless single linked list
Signed-off-by: Shell <[email protected]>
Diffstat (limited to 'include/rttypes.h')
-rw-r--r--include/rttypes.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/rttypes.h b/include/rttypes.h
index 0b614a492a..75bf58d52f 100644
--- a/include/rttypes.h
+++ b/include/rttypes.h
@@ -133,6 +133,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
*/
#ifdef RT_USING_SMP