The Wayback Machine - https://web.archive.org/web/20230131200349/https://github.com/nodejs/node/pull/46427
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

src: use uint32_t for process initialization flags enum #46427

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

addaleax
Copy link
Member

(Semver-major due to ABI change)

Refs: #45221

@addaleax addaleax added c++ Issues and PRs that require attention from people who are familiar with C++. semver-major PRs that contain breaking changes and should be released in the next major version. embedding Issues and PRs related to embedding Node.js in another project. labels Jan 30, 2023
@nodejs-github-bot
Copy link
Contributor

Review requested:

  • @nodejs/startup

@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Jan 30, 2023
@addaleax addaleax force-pushed the process-init-flags-uint32 branch from 52853ca to f3cffbd Compare Jan 30, 2023
@joyeecheung
Copy link
Member

Any reason why we don't make init_process_flags a uint64_t instead? (I hope we don't end up with > 32 options in the flags, but one never knows..)

@addaleax
Copy link
Member Author

@joyeecheung The referenced PR switched this from uint64 to uint32 because the former isn’t always accessible as a lock-free atomic variable, that’s the reason here :)

@addaleax addaleax added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Jan 31, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 31, 2023
@nodejs-github-bot
Copy link
Contributor

@@ -432,6 +432,9 @@ void ResetSignalHandlers() {
}

static std::atomic<uint32_t> init_process_flags = 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a comment here describing why we use a uint32_t?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, makes sense – done in c259b3b!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. embedding Issues and PRs related to embedding Node.js in another project. needs-ci PRs that need a full CI run. semver-major PRs that contain breaking changes and should be released in the next major version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.