Skip to content
Back to skills

Port Linux Wait Queue Logic To Freertos Using Event Groups

ASecurity

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.

  • 611 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
educationapi

Works with

  • api

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill port-linux-wait-queue-logic-to-freertos-using-event-groups --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Port Linux Wait Queue Logic To Freertos Using Event Groups?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Port Linux Wait Queue Logic To Freertos Using Event Groups
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-port-linux-wait-queue-logic-to-freertos-using-even/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-port-linux-wait-queue-logic-to-freertos-using-even)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "caa2bc74-c799-4d52-85df-049d14926a65"
name: "Port Linux wait queue logic to FreeRTOS using event groups"
description: "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."
version: "0.1.0"
tags:
  - "freertos"
  - "linux-kernel"
  - "porting"
  - "event-groups"
  - "synchronization"
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"
---

# 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
1.  **Mapping Strategy**:
    *   Map `wait_queue_head_t` to a FreeRTOS `EventGroupHandle_t`.
    *   Map `task_struct` to a FreeRTOS `TaskHandle_t`.
    *   Map `wait_queue_entry` to a custom structure (e.g., `struct WaitQueueEntry`) that contains a `TaskHandle_t`.
2.  **Implementation Requirements**:
    *   Use FreeRTOS API functions such as `xEventGroupCreate()`, `xEventGroupSetBits()`, and `xEventGroupClearBits()`.
    *   Implement the following specific functions in C:
        *   `init_waitqueue_head()`: Must create and return an `EventGroupHandle_t`.
        *   `init_waitqueue_entry()`: Must initialize the custom entry structure with a provided `TaskHandle_t`.
        *   `add_wait_queue()`: Must add a task to the wait queue by setting the event group bit corresponding to the `TaskHandle_t` (cast to `EventBits_t`).
        *   `wake_up()`: Must wake a specific task by clearing the event group bit corresponding to the `TaskHandle_t`.
        *   `wake_up_all()`: Must wake multiple tasks by clearing specified event group bits.
3.  **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

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in education →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.