Simulate EX_RUNDOWN_REF_CACHE_AWARE APIS #181
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request primarily introduces a new type
EX_RUNDOWN_REF_CACHE_AWARE
, which is an extension ofEX_RUNDOWN_REF
and is designed to be cache aware for better performance. It also adds new APIs to allocate, acquire, release, and free this new type. Additionally, it includes tests for these new APIs and the existingEX_RUNDOWN_REF
APIs.Here are the most important changes:
Type and API additions:
inc/usersim/ex.h
: Introduced a new typeEX_RUNDOWN_REF_CACHE_AWARE
which is similar toEX_RUNDOWN_REF
but is cache aware. This type is expected to improve performance by being aware of the cache. Also, added new APIsExAllocateCacheAwareRundownProtection
,ExAcquireRundownProtectionCacheAware
,ExReleaseRundownProtectionCacheAware
, andExFreeCacheAwareRundownProtection
to work with this new type. [1] [2]src/ex.cpp
: Implemented the new APIs introduced ininc/usersim/ex.h
. These APIs are designed to allocate, acquire, release, and free theEX_RUNDOWN_REF_CACHE_AWARE
type.Test additions:
tests/ex_test.cpp
: Added new tests for theEX_RUNDOWN_REF
andEX_RUNDOWN_REF_CACHE_AWARE
APIs. These tests ensure that the APIs behave as expected, especially in terms of acquiring and releasing rundown protections. [1] [2]