Skip to content

add futex-semaphore example#22

Merged
wokron merged 1 commit into
masterfrom
update-examples
Jan 22, 2026
Merged

add futex-semaphore example#22
wokron merged 1 commit into
masterfrom
update-examples

Conversation

@wokron
Copy link
Copy Markdown
Member

@wokron wokron commented Jan 21, 2026

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds a new example demonstrating futex-based semaphore and mutex implementations using io_uring's futex operations. The example showcases a producer-consumer pattern with configurable parameters.

Changes:

  • Added a new FutexSemaphore class that implements a counting semaphore using futex operations
  • Added a FutexMutex class built on top of the semaphore
  • Implemented a producer-consumer example with command-line configuration options
  • Updated CMakeLists.txt to build the new example

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
examples/futex-semaphore.cpp New example demonstrating futex-based synchronization primitives with a producer-consumer use case
examples/CMakeLists.txt Added build target for the futex-semaphore example

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread examples/futex-semaphore.cpp
Comment thread examples/futex-semaphore.cpp
Comment thread examples/futex-semaphore.cpp Outdated
@wokron wokron merged commit 32ef34c into master Jan 22, 2026
11 checks passed
@wokron wokron deleted the update-examples branch January 22, 2026 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants