Open
Conversation
cameron314
reviewed
Feb 13, 2022
Owner
cameron314
left a comment
There was a problem hiding this comment.
Cool. Looks good overall, just one comment.
atomicops.h
Outdated
|
|
||
| void signal() AE_NO_TSAN | ||
| { | ||
| while (release_sem(m_sema) != B_NO_ERROR); |
Owner
There was a problem hiding this comment.
Looks like an infinite loop on error? As far as I can tell from the docs, release_sem does not return spuriously.
Author
There was a problem hiding this comment.
I removed the while loop as it didn't make sense. The reason I had it in there was because I copied the unix version of it and replaced the methods at first, which was kind of naive from me. If it is ok I'd create a recipe for HaikuPorts once this is merged so it can be installed as an develpment header from a package
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
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.
This should make the library run on Haiku (https://www.haiku-os.org/). The PR uses Haiku's own API. As Haiku has pthreads support in a different directory, I changed the makefiles of the tests, which pass on x64 (I'll also check x32). They of course still work under linux