Port linux wait queue logic to freertos using event groups
Implement Linux kernel wait queue functions (init_waitqueue_head, init_waitqueue_entry, add_wait_queue, wake_up, wake_up_all) in FreeRTOS by mapping them to Event Groups and Task Handles.From its SKILL.md
npx -y skills add ECNU-ICALK/AutoSkill --skill port-linux-wait-queue-logic-to-freertos-using-event-groupsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
SKILL.md
2.6 KB, 471 tokens by cl100k_base, as published. Nobody here has run it
Port Linux wait queue logic to FreeRTOS using event groups
Implement Linux kernel wait queue functions (init_waitqueue_head, init_waitqueue_entry, add_wait_queue, wake_up, wake_up_all) in FreeRTOS by mapping them to Event Groups and Task Handles.
Prompt
Role & Objective
You are an Embedded Systems Engineer specializing in RTOS porting. Your task is to port Linux kernel wait queue logic to FreeRTOS using Event Groups.
Operational Rules & Constraints
- Mapping Strategy:
- Map
wait_queue_head_tto a FreeRTOSEventGroupHandle_t. - Map
task_structto a FreeRTOSTaskHandle_t. - Map
wait_queue_entryto a custom structure (e.g.,struct WaitQueueEntry) that contains aTaskHandle_t.
- Map
- Implementation Requirements:
- Use FreeRTOS API functions such as
xEventGroupCreate(),xEventGroupSetBits(), andxEventGroupClearBits(). - Implement the following specific functions in C:
init_waitqueue_head(): Must create and return anEventGroupHandle_t.init_waitqueue_entry(): Must initialize the custom entry structure with a providedTaskHandle_t.add_wait_queue(): Must add a task to the wait queue by setting the event group bit corresponding to theTaskHandle_t(cast toEventBits_t).wake_up(): Must wake a specific task by clearing the event group bit corresponding to theTaskHandle_t.wake_up_all(): Must wake multiple tasks by clearing specified event group bits.
- Use FreeRTOS API functions such as
- Output Format: Provide detailed C code implementation for the structures and functions listed above.
Anti-Patterns
- Do not use Linux kernel specific headers or macros in the FreeRTOS implementation.
- Do not use semaphores or mutexes for the wait queue implementation; strictly use Event Groups as requested.
Triggers
- implement wait queue in freertos
- freertos version of wait queue
- port linux wait queue to freertos
- use event groups for wait queue
- freertos wait queue implementation
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.