Zephyr Kernel Data Structures – Singly Linked List

Zephyr Kernel Data Structures - Singly Linked List

Singly Linked List The Zephyr singly linked list is implemented in the following file: zephyr/include/zephyr/sys/slist.h. Zephyr stores singly linked list data in sys_slist_t (i.e., each list element stores a pointer to the next element, rather than the data of the previous element). /** @cond INTERNAL_HIDDEN */ struct _slist { sys_snode_t *head; sys_snode_t *tail; }; /** … Read more

Common Data Structures in Zephyr Kernel

Common Data Structures in Zephyr Kernel

This article provides an overview without technical details or usage instructions. The Zephyr kernel uses a generic data structure library, which can also be utilized in applications. The data structures include: Linked List Packet Buffer Red-Black Tree Circular Buffer It is important to note that the APIs for accessing these data structures are not thread-safe. … Read more

How to Communicate Between Threads in C Language

How to Communicate Between Threads in C Language

First, there is no communication issue between threads within the same process. You can access data however you want; thus, we actually need to do something to actively “isolate” different threads to avoid dirty reads and writes. Second, multi-threaded programming (as well as multi-process programming) requires a foundation in operating systems. Without understanding the operating … Read more

Getting Started with FreeRTOS: A Guide to Writing Doubly Linked Lists

Getting Started with FreeRTOS: A Guide to Writing Doubly Linked Lists

Abstract: A few days ago, I talked about single linked lists, today I will discuss doubly linked lists in conjunction with the FreeRTOS linked list source code. Note: A linked list item is a node, and a node is a linked list item, they refer to the same thing, it doesn’t matter what you call … Read more

Mastering FreeRTOS: A Comprehensive Guide to Doubly Linked Lists

Mastering FreeRTOS: A Comprehensive Guide to Doubly Linked Lists

Abstract: Today, we will discuss the doubly linked list by combining the source code of FreeRTOS’s linked list. Note: A linked list item is a node, and a node is a linked list item; they refer to the same thing, and it doesn’t matter what you call it. 1. Defining the Linked List Structure // … Read more