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

Add Interlocked unsigned and bitwise operations #32216

Merged
merged 4 commits into from Feb 14, 2020

Conversation

@stephentoub
Copy link
Member

stephentoub commented Feb 13, 2020

Fixes #24694
Fixes #23819

@GrabYourPitchforks, are the Xor methods really necessary? Where do you expect them to be used?

cc: @jkotas, @GrabYourPitchforks, @tannergooding

@Dotnet-GitSync-Bot

This comment has been minimized.

Copy link
Collaborator

Dotnet-GitSync-Bot commented Feb 13, 2020

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@GrabYourPitchforks

This comment has been minimized.

Copy link
Member

GrabYourPitchforks commented Feb 13, 2020

are the Xor methods really necessary? Where do you expect them to be used?

I see some unmanaged usage with regard to job scheduling, but the scenarios for this (at least in C#) don't seem as clear-cut as the scenarios for And and Or. I'm not going to be terribly sad if we decide to nix Xor. It was really just for logical operator completeness.

@stephentoub

This comment has been minimized.

Copy link
Member Author

stephentoub commented Feb 13, 2020

I'm not going to be terribly sad if we decide to nix xor

Ok, I'm going to remove it. I want to add things only when there's a strong demonstrated need, and I'm not seeing that for xor.

@stephentoub stephentoub force-pushed the stephentoub:interlockedadds branch from b8d7edc to b6a86a3 Feb 13, 2020
@stephentoub stephentoub merged commit 4107a4c into dotnet:master Feb 14, 2020
96 of 100 checks passed
96 of 100 checks passed
runtime Build #20200213.75 had test failures
Details
runtime (Libraries Test Run checked coreclr OSX x64 Debug) Libraries Test Run checked coreclr OSX x64 Debug failed
Details
runtime (Libraries Test Run release coreclr OSX x64 Debug) Libraries Test Run release coreclr OSX x64 Debug failed
Details
runtime (Libraries Test Run release mono OSX x64 Debug) Libraries Test Run release mono OSX x64 Debug failed
Details
WIP Ready for review
Details
license/cla All CLA requirements met.
Details
runtime (Checkout) Checkout succeeded
Details
runtime (CoreCLR Pri0 Test Build Linux arm checked) CoreCLR Pri0 Test Build Linux arm checked succeeded
Details
runtime (CoreCLR Pri0 Test Build Linux arm64 checked) CoreCLR Pri0 Test Build Linux arm64 checked succeeded
Details
runtime (CoreCLR Pri0 Test Build Linux x64 checked) CoreCLR Pri0 Test Build Linux x64 checked succeeded
Details
runtime (CoreCLR Pri0 Test Build OSX x64 checked) CoreCLR Pri0 Test Build OSX x64 checked succeeded
Details
runtime (CoreCLR Pri0 Test Build Windows_NT arm checked) CoreCLR Pri0 Test Build Windows_NT arm checked succeeded
Details
runtime (CoreCLR Pri0 Test Build Windows_NT arm64 checked) CoreCLR Pri0 Test Build Windows_NT arm64 checked succeeded
Details
runtime (CoreCLR Pri0 Test Build Windows_NT x64 checked) CoreCLR Pri0 Test Build Windows_NT x64 checked succeeded
Details
runtime (CoreCLR Pri0 Test Build Windows_NT x86 checked) CoreCLR Pri0 Test Build Windows_NT x86 checked succeeded
Details
runtime (CoreCLR Pri0 Test Run Linux arm checked) CoreCLR Pri0 Test Run Linux arm checked succeeded
Details
runtime (CoreCLR Pri0 Test Run Linux arm64 checked) CoreCLR Pri0 Test Run Linux arm64 checked succeeded
Details
runtime (CoreCLR Pri0 Test Run Linux x64 checked) CoreCLR Pri0 Test Run Linux x64 checked succeeded
Details
runtime (CoreCLR Pri0 Test Run OSX x64 checked) CoreCLR Pri0 Test Run OSX x64 checked succeeded
Details
runtime (CoreCLR Pri0 Test Run Windows_NT arm checked) CoreCLR Pri0 Test Run Windows_NT arm checked succeeded
Details
runtime (CoreCLR Pri0 Test Run Windows_NT arm64 checked) CoreCLR Pri0 Test Run Windows_NT arm64 checked succeeded
Details
runtime (CoreCLR Pri0 Test Run Windows_NT x64 checked) CoreCLR Pri0 Test Run Windows_NT x64 checked succeeded
Details
runtime (CoreCLR Pri0 Test Run Windows_NT x86 checked) CoreCLR Pri0 Test Run Windows_NT x86 checked succeeded
Details
runtime (CoreCLR Product Build Linux arm checked) CoreCLR Product Build Linux arm checked succeeded
Details
runtime (CoreCLR Product Build Linux arm release) CoreCLR Product Build Linux arm release succeeded
Details
runtime (CoreCLR Product Build Linux arm64 checked) CoreCLR Product Build Linux arm64 checked succeeded
Details
runtime (CoreCLR Product Build Linux arm64 release) CoreCLR Product Build Linux arm64 release succeeded
Details
runtime (CoreCLR Product Build Linux x64 checked) CoreCLR Product Build Linux x64 checked succeeded
Details
runtime (CoreCLR Product Build Linux x64 release) CoreCLR Product Build Linux x64 release succeeded
Details
runtime (CoreCLR Product Build Linux_musl arm64 release) CoreCLR Product Build Linux_musl arm64 release succeeded
Details
runtime (CoreCLR Product Build Linux_musl x64 checked) CoreCLR Product Build Linux_musl x64 checked succeeded
Details
runtime (CoreCLR Product Build Linux_musl x64 release) CoreCLR Product Build Linux_musl x64 release succeeded
Details
runtime (CoreCLR Product Build OSX x64 checked) CoreCLR Product Build OSX x64 checked succeeded
Details
runtime (CoreCLR Product Build OSX x64 release) CoreCLR Product Build OSX x64 release succeeded
Details
runtime (CoreCLR Product Build Windows_NT arm checked) CoreCLR Product Build Windows_NT arm checked succeeded
Details
runtime (CoreCLR Product Build Windows_NT arm release) CoreCLR Product Build Windows_NT arm release succeeded
Details
runtime (CoreCLR Product Build Windows_NT arm64 checked) CoreCLR Product Build Windows_NT arm64 checked succeeded
Details
runtime (CoreCLR Product Build Windows_NT arm64 release) CoreCLR Product Build Windows_NT arm64 release succeeded
Details
runtime (CoreCLR Product Build Windows_NT x64 checked) CoreCLR Product Build Windows_NT x64 checked succeeded
Details
runtime (CoreCLR Product Build Windows_NT x64 release) CoreCLR Product Build Windows_NT x64 release succeeded
Details
runtime (CoreCLR Product Build Windows_NT x86 checked) CoreCLR Product Build Windows_NT x86 checked succeeded
Details
runtime (CoreCLR Product Build Windows_NT x86 release) CoreCLR Product Build Windows_NT x86 release succeeded
Details
runtime (Formatting Linux x64) Formatting Linux x64 succeeded
Details
runtime (Formatting Windows_NT x64) Formatting Windows_NT x64 succeeded
Details
runtime (Installer Build and Test Linux_arm Debug) Installer Build and Test Linux_arm Debug succeeded
Details
runtime (Installer Build and Test Linux_arm64 Debug) Installer Build and Test Linux_arm64 Debug succeeded
Details
runtime (Installer Build and Test Linux_musl_arm64 Debug) Installer Build and Test Linux_musl_arm64 Debug succeeded
Details
runtime (Installer Build and Test Linux_musl_x64 Debug) Installer Build and Test Linux_musl_x64 Debug succeeded
Details
runtime (Installer Build and Test Linux_x64 Debug) Installer Build and Test Linux_x64 Debug succeeded
Details
runtime (Installer Build and Test OSX_x64 Debug) Installer Build and Test OSX_x64 Debug succeeded
Details
runtime (Installer Build and Test Windows_NT_arm Debug) Installer Build and Test Windows_NT_arm Debug succeeded
Details
runtime (Installer Build and Test Windows_NT_arm64 Debug) Installer Build and Test Windows_NT_arm64 Debug succeeded
Details
runtime (Installer Build and Test Windows_NT_x64 Debug) Installer Build and Test Windows_NT_x64 Debug succeeded
Details
runtime (Installer Build and Test Windows_NT_x86 Debug) Installer Build and Test Windows_NT_x86 Debug succeeded
Details
runtime (Libraries Build Linux arm Release) Libraries Build Linux arm Release succeeded
Details
runtime (Libraries Build Linux arm64 Debug) Libraries Build Linux arm64 Debug succeeded
Details
runtime (Libraries Build Linux x64 Debug) Libraries Build Linux x64 Debug succeeded
Details
runtime (Libraries Build Linux_musl arm64 Release) Libraries Build Linux_musl arm64 Release succeeded
Details
runtime (Libraries Build Linux_musl x64 Debug) Libraries Build Linux_musl x64 Debug succeeded
Details
runtime (Libraries Build OSX x64 Debug) Libraries Build OSX x64 Debug succeeded
Details
runtime (Libraries Build WebAssembly wasm Debug) Libraries Build WebAssembly wasm Debug succeeded
Details
runtime (Libraries Build Windows_NT allConfigurations x64 Debug) Libraries Build Windows_NT allConfigurations x64 Debug succeeded
Details
runtime (Libraries Build Windows_NT arm Release) Libraries Build Windows_NT arm Release succeeded
Details
runtime (Libraries Build Windows_NT arm64 Release) Libraries Build Windows_NT arm64 Release succeeded
Details
runtime (Libraries Build Windows_NT net472 x86 Release) Libraries Build Windows_NT net472 x86 Release succeeded
Details
runtime (Libraries Build Windows_NT x64 Debug) Libraries Build Windows_NT x64 Debug succeeded
Details
runtime (Libraries Build Windows_NT x86 Debug) Libraries Build Windows_NT x86 Debug succeeded
Details
runtime (Libraries Build Windows_NT x86 Release) Libraries Build Windows_NT x86 Release succeeded
Details
runtime (Libraries Test Build Linux x64 Debug) Libraries Test Build Linux x64 Debug succeeded
Details
runtime (Libraries Test Build OSX x64 Debug) Libraries Test Build OSX x64 Debug succeeded
Details
runtime (Libraries Test Build Windows_NT x64 Debug) Libraries Test Build Windows_NT x64 Debug succeeded
Details
runtime (Libraries Test Run checked coreclr Linux x64 Debug) Libraries Test Run checked coreclr Linux x64 Debug succeeded
Details
runtime (Libraries Test Run checked coreclr Linux_musl x64 Debug) Libraries Test Run checked coreclr Linux_musl x64 Debug succeeded
Details
runtime (Libraries Test Run checked coreclr Windows_NT x64 Debug) Libraries Test Run checked coreclr Windows_NT x64 Debug succeeded
Details
runtime (Libraries Test Run checked coreclr Windows_NT x86 Release) Libraries Test Run checked coreclr Windows_NT x86 Release succeeded
Details
runtime (Libraries Test Run release coreclr Linux x64 Debug) Libraries Test Run release coreclr Linux x64 Debug succeeded
Details
runtime (Libraries Test Run release coreclr Linux_musl x64 Debug) Libraries Test Run release coreclr Linux_musl x64 Debug succeeded
Details
runtime (Libraries Test Run release coreclr Windows_NT x64 Debug) Libraries Test Run release coreclr Windows_NT x64 Debug succeeded
Details
runtime (Libraries Test Run release coreclr Windows_NT x86 Debug) Libraries Test Run release coreclr Windows_NT x86 Debug succeeded
Details
runtime (Libraries Test Run release coreclr Windows_NT x86 Release) Libraries Test Run release coreclr Windows_NT x86 Release succeeded
Details
runtime (Libraries Test Run release mono Linux x64 Debug) Libraries Test Run release mono Linux x64 Debug succeeded
Details
runtime (Mono LLVM Product Build Linux x64 debug) Mono LLVM Product Build Linux x64 debug succeeded
Details
runtime (Mono LLVM Product Build Linux x64 release) Mono LLVM Product Build Linux x64 release succeeded
Details
runtime (Mono LLVM Product Build OSX x64 debug) Mono LLVM Product Build OSX x64 debug succeeded
Details
runtime (Mono LLVM Product Build OSX x64 release) Mono LLVM Product Build OSX x64 release succeeded
Details
runtime (Mono Product Build Linux arm debug) Mono Product Build Linux arm debug succeeded
Details
runtime (Mono Product Build Linux arm release) Mono Product Build Linux arm release succeeded
Details
runtime (Mono Product Build Linux arm64 debug) Mono Product Build Linux arm64 debug succeeded
Details
runtime (Mono Product Build Linux arm64 release) Mono Product Build Linux arm64 release succeeded
Details
runtime (Mono Product Build Linux x64 debug) Mono Product Build Linux x64 debug succeeded
Details
runtime (Mono Product Build Linux x64 release) Mono Product Build Linux x64 release succeeded
Details
runtime (Mono Product Build Linux_musl x64 debug) Mono Product Build Linux_musl x64 debug succeeded
Details
runtime (Mono Product Build Linux_musl x64 release) Mono Product Build Linux_musl x64 release succeeded
Details
runtime (Mono Product Build OSX x64 debug) Mono Product Build OSX x64 debug succeeded
Details
runtime (Mono Product Build OSX x64 release) Mono Product Build OSX x64 release succeeded
Details
runtime (Mono Product Build Windows_NT x64 debug) Mono Product Build Windows_NT x64 debug succeeded
Details
runtime (Mono Product Build Windows_NT x64 release) Mono Product Build Windows_NT x64 release succeeded
Details
runtime (Test crossgen-comparison Linux arm checked) Test crossgen-comparison Linux arm checked succeeded
Details
runtime-live-build Build #20200213.67 succeeded
Details
runtime-live-build (Build Linux x64 debug RuntimeFlavor_Mono) Build Linux x64 debug RuntimeFlavor_Mono succeeded
Details
@stephentoub stephentoub deleted the stephentoub:interlockedadds branch Feb 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.