diff options
| author | Shell <[email protected]> | 2024-10-31 11:56:23 +0800 |
|---|---|---|
| committer | Rbb666 <[email protected]> | 2024-11-03 10:08:45 +0800 |
| commit | 285fee9d4cb6647148476bbdd3bf0796f9e3c6f9 (patch) | |
| tree | d3a4a2dbe731d0ba2a96801f9a2d589a78d29555 /include/rttypes.h | |
| parent | 40cd8cce995e24ea265664c5db127c662a747032 (diff) | |
feat: rtatomic: lockless single linked list
Signed-off-by: Shell <[email protected]>
Diffstat (limited to 'include/rttypes.h')
| -rw-r--r-- | include/rttypes.h | 9 |
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 |
