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
internal/refcount.h: allow non-atomic build #8479
Conversation
Would it make sense to give the define a less official name then? Say, |
Or use |
I like that one. Taken! |
Configure with -DOPENSSL_DEV_NO_ATOMICS and you get refcount without atomics. This is intended for internal development only, to check the refcounting is properly coded. It should never become a configuration option, hence the name of the macro.
a7f35c4
to
9fcb741
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
||
# else | ||
# ifndef HAVE_ATOMICS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The most tricky part was to understand this change here, because it requires looking at all the entire ifdef-spagetti. But I think now that it's ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a bit of commentary, I hope that helps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW and FYI, just in case you ever had the same problem:
I found it hard to follow the preprocessor indentation using Emacs' incremental search, because by default it treats a single literal space character as 'any whitespace'. But I found a way to change that:
https://emacs.stackexchange.com/questions/2819/match-two-spaces-with-incremental-search
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I overlooked that you had dismissed my review. Reconfirmed.
(BTW: there is a new icon 'Re-request review' at the top right in the Reviewers list. I assume this will trigger a note.)
Ah! Thanks |
Merged. 503d474 internal/refcount.h: allow non-atomic build |
Configure with -DOPENSSL_DEV_NO_ATOMICS and you get refcount without atomics. This is intended for internal development only, to check the refcounting is properly coded. It should never become a configuration option, hence the name of the macro. Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from #8479)
Configure with -DOPENSSL_DEV_NO_ATOMICS and you get refcount without
atomics. This is intended for internal development only, to check the
refcounting is properly coded. It should never become a configuration
option, hence the name of the macro.