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

Various cleanups: <xatomic_wait.h> constants #4147

Merged
merged 3 commits into from
Nov 7, 2023

Conversation

StephanTLavavej
Copy link
Member

One more round of cleanups resulting from my audit of things in the global namespace that aren't extern "C".

  • Move _Atomic_wait_no_deadline from <xatomic_wait.h> to atomic_wait.cpp.
    • Nothing else mentions this, obviously.
    • It's moving into the unnamed namespace for isolation, and dropping _INLINE_VAR.
  • Rename _Atomic_wait_no_timeout => __std_atomic_wait_no_timeout
    • This is moving into extern "C" like <xfilesystem_abi.h>'s constants:
      _EXTERN_C
      inline constexpr size_t __std_fs_max_path = 260; // #define MAX_PATH 260
      inline constexpr size_t __std_fs_temp_path_max = __std_fs_max_path + 1;
    • <xatomic_wait.h> can assume C++20 mode, so we can use inline variables unconditionally.
    • There will be a trivial merge conflict with Various cleanups: extern "C" #4143.

It's moving into the unnamed namespace for isolation, and dropping `_INLINE_VAR`.
This is moving into `extern "C"` like `<xfilesystem_abi.h>`'s constants.

`<xatomic_wait.h>` can assume C++20 mode, so we can use `inline` variables unconditionally.
@StephanTLavavej StephanTLavavej added the enhancement Something can be improved label Nov 3, 2023
@StephanTLavavej StephanTLavavej requested a review from a team as a code owner November 3, 2023 21:14
@StephanTLavavej StephanTLavavej self-assigned this Nov 6, 2023
@StephanTLavavej
Copy link
Member Author

I am a greedy kitty who's speculatively mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej
Copy link
Member Author

I've pushed a merge with main to resolve a trivial adjacent-edit conflict with #4143 in xatomic_wait.h.

@StephanTLavavej StephanTLavavej merged commit bc5a5c3 into microsoft:main Nov 7, 2023
35 checks passed
@StephanTLavavej StephanTLavavej deleted the cleanup-atomic-wait branch November 7, 2023 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Something can be improved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants