Skip to content

Change to using atomic for show_help_enabled#3695

Merged
rhc54 merged 1 commit intoopenpmix:masterfrom
rhc54:topic/atm
Oct 10, 2025
Merged

Change to using atomic for show_help_enabled#3695
rhc54 merged 1 commit intoopenpmix:masterfrom
rhc54:topic/atm

Conversation

@rhc54
Copy link
Contributor

@rhc54 rhc54 commented Oct 10, 2025

Rather than using thread locks for all things involving protection against timing. In this case, the only thing we really need is a way to know that initializaiton reached the stage where show-help is ready. So let's use an atomic to detect that we have gotten that far.

We know the compiler is C11 compliant, so we don't need the "built-in" versions of the atomics, which means we also don't need to test a bunch of atomic stuff. Just check to see if the few atomic functions we need are available.

Rather than using thread locks for all things involving
protection against timing. In this case, the only thing
we really need is a way to know that initializaiton reached
the stage where show-help is ready. So let's use an atomic
to detect that we have gotten that far.

We know the compiler is C11 compliant, so we don't need
the "built-in" versions of the atomics, which means we
also don't need to test a bunch of atomic stuff. Just
check to see if the few atomic functions we need are
available.

Signed-off-by: Ralph Castain <rhc@pmix.org>
@rhc54 rhc54 merged commit c05db59 into openpmix:master Oct 10, 2025
27 checks passed
@rhc54 rhc54 deleted the topic/atm branch October 10, 2025 20:04
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.

1 participant