Skip to content

Conversation

@avdgrinten
Copy link
Member

This is a more lightweight alternative to oneshot_event that does not support cancellation.

@avdgrinten avdgrinten requested a review from qookei December 27, 2025 14:22
@avdgrinten
Copy link
Member Author

Benchmark results on my machine:

-----------------------------------------------------------------------------
Benchmark                                   Time             CPU   Iterations
-----------------------------------------------------------------------------
BM_RaiseWait_OneshotEvent                 153 ns          152 ns      4612758
BM_RaiseWait_OneshotPrimitive            31.8 ns         31.8 ns     22245622
BM_WaitRaise_OneshotEvent                 857 ns          856 ns       809939
BM_WaitRaise_OneshotPrimitive             316 ns          316 ns      2021960
BM_WaitTwiceRaise_OneshotEvent           1495 ns         1494 ns       515077
BM_WaitTwiceRaise_OneshotPrimitive        554 ns          554 ns      1326654

@qookei
Copy link
Member

qookei commented Dec 27, 2025

Actually, there is one problem, tests fail to build on CI because Google Benchmark is not installed.

@avdgrinten avdgrinten merged commit 54ed296 into managarm:master Dec 27, 2025
1 of 3 checks passed
@avdgrinten avdgrinten deleted the oneshot_primitive branch December 27, 2025 18:23
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.

3 participants