Skip to content

cpu: better defaults on darwin ARM64#267

Closed
ncruces wants to merge 1 commit intogolang:masterfrom
ncruces:master
Closed

cpu: better defaults on darwin ARM64#267
ncruces wants to merge 1 commit intogolang:masterfrom
ncruces:master

Conversation

@ncruces
Copy link
Contributor

@ncruces ncruces commented Feb 9, 2026

This is motivated by
wazero/wazero#2473
which needs to special case darwin for testing the availability of
HasATOMICS, although all M-series CPUs support it.

We could do sysctlbyname, like syscall_darwin_x86_gc.go, if that's
preferred:
https://developer.apple.com/documentation/kernel/1387446-sysctlbyname/determining_instruction_set_characteristics

@gopherbot
Copy link
Contributor

This PR (HEAD: d5d0f1e) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/sys/+/743320.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to log in to Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 1:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/743320.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Keith Randall:

Patch Set 1: Auto-Submit+1 Code-Review+2 Commit-Queue+1

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/743320.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 1:

Dry run: CV is trying the patch.

Bot data: {"action":"start","triggered_at":"2026-02-09T17:48:37Z","revision":"5a91551df92cce33f12a625df8a21e379b1485f2"}


Please don’t reply on this GitHub thread. Visit golang.org/cl/743320.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Keith Randall:

Patch Set 1: -Commit-Queue

(Posted by golang-scoped@luci-project-accounts.iam.gserviceaccount.com on behalf of khr@golang.org)


Please don’t reply on this GitHub thread. Visit golang.org/cl/743320.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 1:

This CL has passed the run


Please don’t reply on this GitHub thread. Visit golang.org/cl/743320.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Go LUCI:

Patch Set 1: LUCI-TryBot-Result+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/743320.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Nuno Cruces:

Patch Set 1:

(2 comments)


Please don’t reply on this GitHub thread. Visit golang.org/cl/743320.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Keith Randall:

Patch Set 2: Auto-Submit+1 Code-Review+2

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/743320.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Keith Randall:

Patch Set 2: Code-Review+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/743320.
After addressing review feedback, remember to publish your drafts!

gopherbot pushed a commit that referenced this pull request Feb 12, 2026
This is motivated by
wazero/wazero#2473
which needs to special case darwin for testing the availability of
HasATOMICS, although all M-series CPUs support it.

We could do sysctlbyname, like syscall_darwin_x86_gc.go, if that's
preferred:
https://developer.apple.com/documentation/kernel/1387446-sysctlbyname/determining_instruction_set_characteristics

Change-Id: I0f5ea55ef5cda4956db44b2d40f2f10044fa3321
GitHub-Last-Rev: d5d0f1e
GitHub-Pull-Request: #267
Reviewed-on: https://go-review.googlesource.com/c/sys/+/743320
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
@gopherbot
Copy link
Contributor

This PR is being closed because golang.org/cl/743320 has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants