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

lock-free init_process_flags for all archs #45221

Merged
merged 1 commit into from Oct 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/node.cc
Expand Up @@ -429,7 +429,7 @@ void ResetSignalHandlers() {
#endif // __POSIX__
}

static std::atomic<uint64_t> init_process_flags = 0;
static std::atomic<uint32_t> init_process_flags = 0;
kapouer marked this conversation as resolved.
Show resolved Hide resolved

static void PlatformInit(ProcessInitializationFlags::Flags flags) {
// init_process_flags is accessed in ResetStdio(),
Expand Down
2 changes: 2 additions & 0 deletions src/node.h
Expand Up @@ -228,6 +228,8 @@ class MultiIsolatePlatform;
class InitializationResultImpl;

namespace ProcessFlags {
// TODO(addaleax): Switch to uint32_t to match std::atomic<uint32_t>
// init_process_flags in node.cc
enum Flags : uint64_t {
kNoFlags = 0,
// Enable stdio inheritance, which is disabled by default.
Expand Down