feat: rtatomic: lockless single linked list

Signed-off-by: Shell <smokewood@qq.com>
This commit is contained in:
Shell
2024-10-31 11:56:23 +08:00
committed by Rbb666
parent 40cd8cce99
commit 285fee9d4c
2 changed files with 42 additions and 0 deletions

View File

@@ -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
*/