Skip to content

Commit

Permalink
src: lock-free init_process_flags
Browse files Browse the repository at this point in the history
  • Loading branch information
kapouer committed Oct 28, 2022
1 parent 2081082 commit 2fc42b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/node.cc
Original file line number Diff line number Diff line change
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;

static void PlatformInit(ProcessInitializationFlags::Flags flags) {
// init_process_flags is accessed in ResetStdio(),
Expand Down
3 changes: 2 additions & 1 deletion src/node.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ class MultiIsolatePlatform;
class InitializationResultImpl;

namespace ProcessFlags {
enum Flags : uint64_t {
// uint32_t is lock-free
enum Flags : uint32_t {
kNoFlags = 0,
// Enable stdio inheritance, which is disabled by default.
// This flag is also implied by kNoStdioInitialization.
Expand Down

0 comments on commit 2fc42b0

Please sign in to comment.