Skip to content
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

Reorder perl.h with regard to mutex locking #22077

Merged
merged 5 commits into from Apr 1, 2024

Conversation

khwilliamson
Copy link
Contributor

These several commits reorder the complex mutex locking in perl.h so that it is all adjacent; for understandability and convenience in maintaining

Prior to this commit we avoided #defining a symbol until later, so that
that fact could be used for further decisions.  But this is a bit
awkward, and so this commit introduces an additional #define that can be
used for the decisions, while defining the symbol at the place where it
makes the most sense to.
This moves the non-lock macro definitions to after the lock ones.
I can't find a place in this file for this to go that isn't somewhat
awkward.  Because the environment and locale mutexes are intertwined,
they naturally fit together.  One would think the basic initialization
and termination of the locale mutexes should go ahead of their use.  But
because of all the complications, that interrupts the flow of the logic
between the environment and locale mutexes, so this commit moves them to
later in the file.
@khwilliamson khwilliamson merged commit e2c324f into Perl:blead Apr 1, 2024
29 checks passed
@khwilliamson khwilliamson deleted the perl.h branch April 1, 2024 21:26
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.

None yet

2 participants