Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cxplat queued spinlocks #227

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

Alan-Jowett
Copy link
Member

This pull request introduces a new locking mechanism using spin locks and lock queue handles in the cxplat library. The changes include new function definitions, type declarations, and test cases to ensure the functionality is correctly implemented and tested.

New locking mechanism:

  • Added new type definitions for cxplat_spin_lock_t and cxplat_lock_queue_handle_t in cxplat/inc/cxplat_processor.h to support the new locking mechanism.
  • Implemented new functions for acquiring and releasing in-stack queued spin locks in cxplat/src/cxplat_winkernel/processor_winkernel.c. These functions wrap the corresponding kernel functions.
  • Added similar functions for acquiring and releasing in-stack queued spin locks in cxplat/src/cxplat_winuser/processor_winuser.cpp, using SRW locks for user-mode implementation.

Testing:

  • Added a new test case for the locking mechanism in cxplat/cxplat_test/cxplat_processor_test.cpp to validate the initialization, acquisition, and release of the spin lock.

Signed-off-by: Alan Jowett <[email protected]>
@Alan-Jowett Alan-Jowett merged commit 8295e9b into microsoft:main Nov 14, 2024
9 checks passed
@Alan-Jowett Alan-Jowett deleted the queued_spin_lock branch November 14, 2024 20:32
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