-
Notifications
You must be signed in to change notification settings - Fork 35
Add init/teardown functions: umfInit() and umfTearDown() #530
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
Merged
bratpiorka
merged 3 commits into
oneapi-src:main
from
ldorau:Add_init_teardown_functions_umfInit_and_umfTearDown
Jun 10, 2024
Merged
Add init/teardown functions: umfInit() and umfTearDown() #530
bratpiorka
merged 3 commits into
oneapi-src:main
from
ldorau:Add_init_teardown_functions_umfInit_and_umfTearDown
Jun 10, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closed
3 tasks
bratpiorka
reviewed
Jun 5, 2024
bratpiorka
reviewed
Jun 5, 2024
PatKamin
reviewed
Jun 5, 2024
17a9f28
to
a65ebfc
Compare
e81f9d8
to
b92394a
Compare
PatKamin
reviewed
Jun 6, 2024
b92394a
to
699863b
Compare
PatKamin
approved these changes
Jun 6, 2024
bf6dcd5
to
8afff82
Compare
bratpiorka
approved these changes
Jun 6, 2024
8afff82
to
c9bbece
Compare
c9bbece
to
3fa7cb3
Compare
Converted to a draft, because CI builds sometimes fail. |
ade1161
to
905dced
Compare
you can rebase with the temp CI hotfix (already on main) |
905dced
to
3bab226
Compare
@lukaszstolarczuk @bratpiorka Rebased |
kswiecicki
approved these changes
Jun 10, 2024
3bab226
to
ee23203
Compare
Reset all UTIL_ONCE_FLAG variables to UTIL_ONCE_FLAG_INIT at the end of destroying. Signed-off-by: Lukasz Dorau <[email protected]>
- umfInit() increments the usage reference counter and initializes the global state of libumf if the usage reference counter was equal 0. Returns 0 on success or -1 on failure. It must be called just after dlopen() and it is not required in other scenarios. - umfTearDown() decrements the usage reference counter and destroys the global state of libumf if the usage reference counter is equal 0. It must be called just before dlclose() and it is not required in other scenarios. Fixes: oneapi-src#514 Signed-off-by: Lukasz Dorau <[email protected]>
Signed-off-by: Lukasz Dorau <[email protected]>
ee23203
to
a562f8e
Compare
@bratpiorka @lukaszstolarczuk all builds pass now |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Add init/teardown functions:
umfInit()
andumfTearDown()
:umfInit()
increments the usage reference counter and initializes the global state of libumf if the usage reference counter was equal 0. Returns 0 on success or -1 on failure.umfTearDown()
decrements the usage reference counter and destroys the global state of libumf if the usage reference counter is equal 0.Fixes: #514
Checklist