-
Notifications
You must be signed in to change notification settings - Fork 605
Comparing changes
Open a pull request
base repository: golang/sys
base: b06ce05
head repository: golang/sys
compare: 1edeebe
- 7 commits
- 12 files changed
- 6 contributors
Commits on Sep 17, 2025
-
sys: add support for NetBSD getvfsstat
NetBSD replaced the getfsstat interface with getvfsstat in NetBSD 3.0. Add a test for it. With help from Benny Siegert and Ian Lance Taylor. Change-Id: I115ae48c287cc32181006e9e8f7c15851e7e36c0 Reviewed-on: https://go-review.googlesource.com/c/sys/+/550476 Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Benny Siegert <bsiegert@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Benny Siegert <bsiegert@gmail.com> Auto-Submit: Ian Lance Taylor <iant@golang.org>
Configuration menu - View commit details
-
Copy full SHA for 137f2ed - Browse repository at this point
Copy the full SHA 137f2edView commit details
Commits on Sep 18, 2025
-
unix: use Go 1.21+ clear built-in
Inspired by CL 698495. Change-Id: Ic6ff68a60d41b6ffb6a28f523597c5d36c1e4d2f Reviewed-on: https://go-review.googlesource.com/c/sys/+/704915 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Sean Liao <sean@liao.dev> Reviewed-by: Mark Freeman <markfreeman@google.com>
Configuration menu - View commit details
-
Copy full SHA for 32e2038 - Browse repository at this point
Copy the full SHA 32e2038View commit details -
windows: add FlushConsoleInputBuffer and GetNumberOfConsoleInputEvents
This adds syscall wrappers for FlushConsoleInputBuffer and GetNumberOfConsoleInputEvents on Windows. Change-Id: I2365aebc42a57f83cfc951e10520270e1f3e0606 GitHub-Last-Rev: 1f711a5 GitHub-Pull-Request: #264 Reviewed-on: https://go-review.googlesource.com/c/sys/+/704715 Reviewed-by: Mark Freeman <markfreeman@google.com> Auto-Submit: Sean Liao <sean@liao.dev> Reviewed-by: Quim Muntal <quimmuntal@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
Configuration menu - View commit details
-
Copy full SHA for 6be6c58 - Browse repository at this point
Copy the full SHA 6be6c58View commit details
Commits on Sep 26, 2025
-
unix: add (*CPUSet).Fill helper to enable all CPUs
Some programs (such as container runtimes) want to reset their CPU affinity if they are spawned by processes with a particular CPU affinity. Container runtimes didn't really have to deal with this issue until Linux 6.2 when the cpuset cgroup was changed to no longer auto-reset CPU affinity in this case. A naive approach to resetting your CPU affinity would be to get the number of CPUs by looking at "/proc/stat" or "/sys/devices/system/cpu" (note that runtime.NumCPU() actually returns the CPU affinity of the process at startup time, which isn't useful for this purpose) and then asking for all of those CPUs. However, sched_setaffinity(2) will silently ignore any CPU bits set in the provided CPUSet if they do not exist or are not enabled in the cpuset cgroup of the process. This means that you can reset your CPU affinity by just setting every CPU bit in CPUSet and passing it to sched_setaffinity(2). Unfortunately, setting every CPU bit in CPUSet with (*CPUSet).Set() is very inefficient. If it were possible to just memset(0xFF) the CPUSet array, users would be able to reset their CPU affinity even more cheaply. However, Go doesn't have a memset primitive that can be used in that way. Obvious solutions like setting the array elements of CPUSet to (^0) do not work because CPUSet is an array of a private newtype and so the compiler complains if you try to use a constant like (^0) without a cast (and we cannot use a cast because the type is private): cannot use ^0 (untyped int constant -1) as "golang.org/x/sys/unix".cpuMask value in assignment (overflows) The only real alternative is to do something quite hacky like: cpuset := unix.CPUSet{} for i := range cpuset { cpuset[i]-- // underflow to 0xFF..FF } ... which is the solution we use in runc. It would be much nicer to have a helper that does this memset for us in a less hacky way, since resetting CPU affinity seems like a fairly common operation. Ref: Linux kernel commit da019032819a ("sched: Enforce user requested affinity") Fixes golang/go#75186 Change-Id: I211ddeafd54ce35079a67493123d28e1bb76966a GitHub-Last-Rev: 71871db GitHub-Pull-Request: #259 Reviewed-on: https://go-review.googlesource.com/c/sys/+/698015 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Kirill Kolyshkin <kolyshkin@gmail.com> Reviewed-by: Junyang Shao <shaojunyang@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
Configuration menu - View commit details
-
Copy full SHA for 033906b - Browse repository at this point
Copy the full SHA 033906bView commit details -
windows: export O_FILE_FLAG_* to be used in os.OpenFile on windows
These file flags are supported by os.OpenFile since CL 699415. Closes golang/go#73676 Change-Id: Iaf846c9cb98c1458bbc30d05ad8a331ef1f332df Reviewed-on: https://go-review.googlesource.com/c/sys/+/700975 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: Junyang Shao <shaojunyang@google.com>
Configuration menu - View commit details
-
Copy full SHA for 5e63aa5 - Browse repository at this point
Copy the full SHA 5e63aa5View commit details
Commits on Oct 2, 2025
-
unix: use slices.{Equal,Sort} in tests
Same as CL 587655 and CL 690475 did for package syscall tests. Change-Id: Ie3c8726a4e2c859b5d7992ea1baec14083b9fdba Reviewed-on: https://go-review.googlesource.com/c/sys/+/708558 Reviewed-by: Junyang Shao <shaojunyang@google.com> Reviewed-by: Florian Lehner <lehner.florian86@gmail.com> Reviewed-by: Carlos Amedee <carlos@golang.org> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Sean Liao <sean@liao.dev>
Configuration menu - View commit details
-
Copy full SHA for ecada54 - Browse repository at this point
Copy the full SHA ecada54View commit details -
unix: mkall.sh: fail if docker build failed
When docker build fails, docker run (in my case podman) tries to find the generate:linux image from various mirrors, which is very confusing. We should error out if docker build fails. Change-Id: I4fd78e9fa339e03029b1bf003b3239ca23a7ed1b Reviewed-on: https://go-review.googlesource.com/c/sys/+/706916 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Kirill Kolyshkin <kolyshkin@gmail.com> Reviewed-by: Junyang Shao <shaojunyang@google.com> Reviewed-by: Sean Liao <sean@liao.dev> Reviewed-by: Carlos Amedee <carlos@golang.org>
Configuration menu - View commit details
-
Copy full SHA for 1edeebe - Browse repository at this point
Copy the full SHA 1edeebeView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff b06ce05...1edeebe