Tobias Klauser
b8be2fde2a
cpu: add //go:build line to cpu_gccgo_x86.c
...
Change-Id: I597a83c767bf597f4d5c2ffdd7097f3cd6781f84
Reviewed-on: https://go-review.googlesource.com/c/sys/+/460158
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Heschi Kreinick <heschi@google.com >
2023-01-05 18:34:43 +00:00
Tobias Klauser
1e9f34104d
unix: add //go:build line to gccgo_c.c
...
Change-Id: I425df52458cc53afb986a260a41d0b638bd5e6e8
Reviewed-on: https://go-review.googlesource.com/c/sys/+/460157
Reviewed-by: Ian Lance Taylor <iant@google.com >
Reviewed-by: Heschi Kreinick <heschi@google.com >
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
2023-01-05 18:34:21 +00:00
Benny Siegert
b60007cc4e
unix: add Uvmexp and SysctlUvmexp for NetBSD
...
NetBSD has both struct uvmexp (used internally) and struct uvmexp_sysctl
(preferred for interfacing from user code). Expose the latter as type
Uvmexp with the same interface as on OpenBSD.
I am not sure if it makes sense to even have a name parameter for
SysctlUvmexp, since the only valid value can be "vm.uvmext2".
Change-Id: I40a743536c28e3fb7a54253768db35b1629fabfe
Reviewed-on: https://go-review.googlesource.com/c/sys/+/460156
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Benny Siegert <bsiegert@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
v0.4.0
2023-01-04 08:37:59 +00:00
Tobias Klauser
b751db56c7
unix: gofmt hurd files after CL 459895
...
As suggested by Dmitri.
Change-Id: Ia42331fc7e7baa22a392e0b3a23485da61d12428
Reviewed-on: https://go-review.googlesource.com/c/sys/+/460155
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
2023-01-01 01:24:11 +00:00
Samuel Thibault
b360406616
unix: support TIOCGETA on GNU/Hurd
...
Add minimal support for GNU/Hurd to allow building third party packages
which detect terminal support.
Change-Id: Ia13fe8e9e4880e8ab062f9a2efb581320637f017
GitHub-Last-Rev: f612efbe7d
GitHub-Pull-Request: golang/sys#144
Reviewed-on: https://go-review.googlesource.com/c/sys/+/459895
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
Run-TryBot: Ian Lance Taylor <iant@google.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
2022-12-31 00:01:51 +00:00
Joel Sing
3086868dc2
unix: regen on OpenBSD 7.2
...
Regenerate z{errors,sysctl,types} on OpenBSD 7.2 for all ports.
Change-Id: I351f7b2e1504a8be764582897af64c8a50c49f06
Reviewed-on: https://go-review.googlesource.com/c/sys/+/459499
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Run-TryBot: Ian Lance Taylor <iant@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
2022-12-30 16:58:58 +00:00
Joel Sing
2b11e6ba75
unix: remove Mclpool from openbsd types
...
This struct was removed from the OpenBSD headers more than eight years
ago (r1.157 of net/if.h).
Change-Id: Ic2d1b3325dc5d00859584b3756a9f7c56b4ec417
Reviewed-on: https://go-review.googlesource.com/c/sys/+/459498
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Ian Lance Taylor <iant@google.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
2022-12-30 16:58:38 +00:00
Joel Sing
7c6badcd7c
unix: convert openbsd/mips64 to direct libc calls
...
The current code has continued to work on OpenBSD, since it has been using
syscall(2) via libc. However, the system call numbers are still hardcoded in
golang.org/x/sys/unix. Various system call changes have been made in OpenBSD,
resulting in changes to the system call numbers and arguments, which now
fail when this package is used.
Switch to calling various system calls directly via libc, rather than calling
via libc using syscall(2).
Unfortunately, this will no longer work on upstream Go since the changes
needed to convert it to libc are still blocked pending review. This means
that we're in a less than ideal situation where upstream Go openbsd/mips64
does not work on any supported OpenBSD release (in fact has not since
OpenBSD 6.8, which was EOL over a year ago), however golang.org/x/sys/unix
is now unusable with the Go package that ships with supported releases via
OpenBSD ports. It would seem that being able to actually use Go software on
a supported OpenBSD release trumps maintaining compatibility with the
unusable upstream Go source.
Updates golang/go#36435
Change-Id: Id8947cd0e4e05709e96c3d4478ac8789b924d416
Reviewed-on: https://go-review.googlesource.com/c/sys/+/459497
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Run-TryBot: Ian Lance Taylor <iant@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
2022-12-30 16:58:14 +00:00
Eric Lagergren
3b1fc93fc1
unix: avoid allocations for common uses of Readv, Writev, etc.
...
Fixes golang/go#57296
Change-Id: Ifd57487122a590df467e97e2d35f388a58cc080d
Reviewed-on: https://go-review.googlesource.com/c/sys/+/457815
Run-TryBot: Ian Lance Taylor <iant@google.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Run-TryBot: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
Auto-Submit: Ian Lance Taylor <iant@google.com >
Reviewed-by: Benny Siegert <bsiegert@gmail.com >
Reviewed-by: Matt Layher <mdlayher@gmail.com >
2022-12-21 03:31:56 +00:00
Brad Fitzpatrick
2204b6615f
cpu: parse /proc/cpuinfo on linux/arm64 on old kernels when needed
...
Updates tailscale/tailscale#5793
Fixes golang/go#57336
Change-Id: I4f8128bebcc58f265d447ecaaad2473aafa9131c
Reviewed-on: https://go-review.googlesource.com/c/sys/+/458315
Reviewed-by: Michael Pratt <mpratt@google.com >
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org >
Auto-Submit: Brad Fitzpatrick <bradfitz@golang.org >
Reviewed-by: David Chase <drchase@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
2022-12-20 02:54:02 +00:00
Eric Lagergren
72f772c4d7
unix: offs2lohi should shift by bits, not bytes
...
Fixes golang/go#57291
Change-Id: I212ab8a9f47563d9c124a0f20c17df35d7aa8e6d
Reviewed-on: https://go-review.googlesource.com/c/sys/+/457315
Auto-Submit: Ian Lance Taylor <iant@google.com >
Reviewed-by: Than McIntosh <thanm@google.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Run-TryBot: Ian Lance Taylor <iant@golang.org >
2022-12-15 14:26:47 +00:00
Tobias Klauser
cffae8ece4
unix: add ClockGettime on *bsd and solaris
...
The same wrapper is already implemented on linux and darwin.
Change-Id: Ia986fdfc28767356451d157e53f11e8d9ca86f2c
Reviewed-on: https://go-review.googlesource.com/c/sys/+/456795
TryBot-Result: Gopher Robot <gobot@golang.org >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Reviewed-by: Than McIntosh <thanm@google.com >
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com >
2022-12-13 14:01:47 +00:00
Dave Pifke
96e75de924
unix: improve Sendmsg and Recvmsg documentation
...
This clarifies these functions' behavior when the non-control data is
empty but there is a control data present.
It also makes clear the difference between Sendmsg, SendmsgN, and
SendmsgBuffers, and between Recvmsg and RecvmsgBuffers.
Fixes golang/go#56911
Change-Id: I1e35659e66e493c192af7f5a426a316f6052475c
Reviewed-on: https://go-review.googlesource.com/c/sys/+/456816
Run-TryBot: Ian Lance Taylor <iant@google.com >
Reviewed-by: Than McIntosh <thanm@google.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Auto-Submit: Ian Lance Taylor <iant@google.com >
2022-12-13 14:00:46 +00:00
Tobias Klauser
127c0dd26a
unix/linux: use Go 1.20rc1 to generate files
...
Change-Id: I1bdf6c1d61a3a9835d2f6a7fd54b38a8a16efa16
Reviewed-on: https://go-review.googlesource.com/c/sys/+/456455
Reviewed-by: Than McIntosh <thanm@google.com >
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
2022-12-12 14:20:30 +00:00
Johan Jansson
3ca3b18c8b
windows: add GetLargePageMinimum
...
https://learn.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-getlargepageminimum
Fixes golang/go#53900
Change-Id: If460e926af0cfa3fcf0d01422411abd01dae791c
Reviewed-on: https://go-review.googlesource.com/c/sys/+/444975
Run-TryBot: Alex Brainman <alex.brainman@gmail.com >
Reviewed-by: Jenny Rakoczy <jenny@golang.org >
Reviewed-by: Cherry Mui <cherryyz@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Alex Brainman <alex.brainman@gmail.com >
v0.3.0
2022-12-03 00:43:30 +00:00
Sebastiaan van Stijn
d684c6f886
execabs: isGo119ErrDot: use errors.Is instead of string-matching
...
Addresses the TODO added in CL 403256.
Change-Id: Iae44242e00b6a309cc0f1e336462bc2d4995a5e2
GitHub-Last-Rev: 1adfdb7994
GitHub-Pull-Request: golang/sys#142
Reviewed-on: https://go-review.googlesource.com/c/sys/+/448877
Auto-Submit: Ian Lance Taylor <iant@google.com >
Run-TryBot: Ian Lance Taylor <iant@google.com >
Reviewed-by: Michael Knyszek <mknyszek@google.com >
Run-TryBot: Ian Lance Taylor <iant@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
2022-11-10 21:11:17 +00:00
Marten Seemann
fc697a31fa
unix: add ParseOneSocketControlMessage to parse control messages without allocating
...
Fixes golang/go#54714 .
Change-Id: If711272937078b6c696756823aa4dfcec358b719
Reviewed-on: https://go-review.googlesource.com/c/sys/+/425917
Reviewed-by: Matt Layher <mdlayher@gmail.com >
Reviewed-by: Michael Pratt <mpratt@google.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Run-TryBot: Ian Lance Taylor <iant@google.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
Run-TryBot: Matt Layher <mdlayher@gmail.com >
v0.2.0
2022-11-02 19:48:38 +00:00
Ian Lance Taylor
5726498127
unix: in Linux sendmsgN actually send one normal byte
...
A bug in CL 412497 caused us to set up an iovec for a dummy byte
but fail to use it
Fixes golang/go#56384
Change-Id: If56fea5c47e5c6fac92f9707d4c3dd78f7999a65
Reviewed-on: https://go-review.googlesource.com/c/sys/+/445255
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
Run-TryBot: Ian Lance Taylor <iant@google.com >
Run-TryBot: Ian Lance Taylor <iant@golang.org >
Reviewed-by: Heschi Kreinick <heschi@google.com >
2022-10-25 17:44:04 +00:00
dustin-ward
95e765b1cc
x/sys/unix: make ReadDirent available on zOS
...
Currently ReadDirent is not available on zOS. This implementation modifies the current darwin implementation to work on zOS.
Also make tests available on zOS.
Fixes golang/go#54528
Fixes golang/go#54587
Change-Id: I62a09d0068ec8c5fdc849a411ce43bdf14ca3926
Reviewed-on: https://go-review.googlesource.com/c/sys/+/424778
Reviewed-by: Ian Lance Taylor <iant@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Joedian Reid <joedian@golang.org >
Reviewed-by: Bill O'Farrell <billotosyr@gmail.com >
Run-TryBot: Ian Lance Taylor <iant@google.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
v0.1.0
2022-10-13 17:17:32 +00:00
Joel Sing
090e33056c
unix: add support for openbsd/ppc64
...
Updates golang/go#56001
Change-Id: Ic2c7db7a0c2056d3bbc153066c187f27508cb96c
Reviewed-on: https://go-review.googlesource.com/c/sys/+/439978
Reviewed-by: Ian Lance Taylor <iant@google.com >
Run-TryBot: Joel Sing <joel@sing.id.au >
Reviewed-by: Bryan Mills <bcmills@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2022-10-10 17:02:43 +00:00
Joel Sing
3938a4f48c
cpu: add support for ppc64 on platforms other than aix and linux
...
This allows the cpu package to function on openbsd/ppc64.
Updates golang/go#56001
Change-Id: Iff306b6091da8f7dc28dd1bd2c9ba668b5318a67
Reviewed-on: https://go-review.googlesource.com/c/sys/+/439977
Run-TryBot: Joel Sing <joel@sing.id.au >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Bryan Mills <bcmills@google.com >
2022-10-10 17:02:31 +00:00
Joel Sing
a970992b06
unix: add support for openbsd/riscv64
...
Updates golang/go#55999
Change-Id: I2ea76f72faaddc46da0c37650de702bc7e90eea2
Reviewed-on: https://go-review.googlesource.com/c/sys/+/439976
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Reviewed-by: Bryan Mills <bcmills@google.com >
Run-TryBot: Joel Sing <joel@sing.id.au >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2022-10-10 17:02:16 +00:00
Joel Sing
e2bdbfeefc
unix: flip openbsd libc build tags
...
Rather than listing OpenBSD architectures that are using libc, list the one
that is still blocked on direct system calls. This will simplify the addition
of new OpenBSD ports.
Updates golang/go#36435
Change-Id: I8d1d16a033245af436d955b5fa6ceeaa1f2a9f6b
Reviewed-on: https://go-review.googlesource.com/c/sys/+/439975
Run-TryBot: Joel Sing <joel@sing.id.au >
Reviewed-by: Bryan Mills <bcmills@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
2022-10-10 17:01:58 +00:00
Sebastiaan van Stijn
abe0a0adba
windows: replace uses of Close() with CloseHandle()
...
Since https://golang.org/cl/4600042 , Close is a straight wrapper of CloseHandle.
Change-Id: I45067e3cc649ea40deb88a8d9d223d7ca882ee7f
GitHub-Last-Rev: 076621a25c
GitHub-Pull-Request: golang/sys#139
Reviewed-on: https://go-review.googlesource.com/c/sys/+/441436
TryBot-Result: Gopher Robot <gobot@golang.org >
Run-TryBot: Ian Lance Taylor <iant@google.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Reviewed-by: Bryan Mills <bcmills@google.com >
2022-10-10 16:03:19 +00:00
Nahum Shalman
68d869b943
unix: migrate some illumos definitions to solaris
...
Fixes golang/go#56000
Change-Id: Ica6549385ddb466c4697cc45851e2b59fd6e0f24
Reviewed-on: https://go-review.googlesource.com/c/sys/+/437357
Run-TryBot: Ian Lance Taylor <iant@google.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Reviewed-by: Bryan Mills <bcmills@google.com >
2022-10-10 16:01:39 +00:00
kxxt
84dc82d7e8
all: use grep -E/-F instead of fgrep/egrep
...
egrep and fgrep are obsolescent now.
This PR updates all egrep and fgrep commands to grep -E and grep -F.
Running egrep/fgrep command with grep v3.8 will output the following warning to stderr:
egrep: warning: egrep is obsolescent; using grep -E
see also:
https://www.phoronix.com/news/GNU-Grep-3.8-Stop-egrep-fgrep
https://lists.gnu.org/archive/html/info-gnu/2022-09/msg00001.html
Change-Id: I0c6b6a039063d6aee94e8500971001996d4e498c
GitHub-Last-Rev: 1eee614766
GitHub-Pull-Request: golang/sys#137
Reviewed-on: https://go-review.googlesource.com/c/sys/+/432835
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Reviewed-by: Carlos Amedee <carlos@golang.org >
Auto-Submit: Ian Lance Taylor <iant@google.com >
Run-TryBot: Ian Lance Taylor <iant@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
2022-10-06 21:19:17 +00:00
Tobias Klauser
f11e5e49a4
unix: use unsafe.Slice in (*FileHandle).Bytes
...
Change-Id: Ic2b88577ec6fd975bbba0538790d2ff312d85d3f
Reviewed-on: https://go-review.googlesource.com/c/sys/+/435776
Reviewed-by: Benny Siegert <bsiegert@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
2022-09-28 14:01:12 +00:00
Tobias Klauser
6fa7a7ca2b
windows: allow calling WSASendto with nil Sockaddr
...
Same as CL 434535 did for the syscall package.
For golang/go#55845
Change-Id: I17f30152ae973b64ac65e08cefd5442e9bf19e2c
Reviewed-on: https://go-review.googlesource.com/c/sys/+/435777
TryBot-Result: Gopher Robot <gobot@golang.org >
Run-TryBot: Benny Siegert <bsiegert@gmail.com >
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Benny Siegert <bsiegert@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
2022-09-28 14:00:15 +00:00
Lorenz Bauer
c57c793909
unix: add SIG_BLOCK and friends for Linux
...
The recently added PthreadSigmask syscall expects a parameter
how that specifies which action to perform on the thread's signal
set. The value of this parameter differs between arches. Add the
SIG_* constants to have a portable source.
Updates golang/go#55349
Change-Id: I7cb42d7c2c42e9b3d22123e8de74960121d89313
Reviewed-on: https://go-review.googlesource.com/c/sys/+/435775
Reviewed-by: Benny Siegert <bsiegert@gmail.com >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
2022-09-28 13:57:37 +00:00
Lorenz Bauer
d9d178bc13
unix: add PthreadSigmask for Linux
...
Add a syscall wrapper for SYS_RT_SIGPROCMASK and export it as
PthreadSigmask. The latter is defined by POSIX and can therefore
be implemented by Darwin, etc. later on.
Follow the approach used by Signalfd of passing _C__NSIG/8 as
sigsetsize. This avoids exporting _C__NSIG and allows the syscall
to work with the current definition of Sigset_t, which doesn't
match the kernel definition of Sigset_t.
Updates golang/go#55349
Change-Id: I49dc93366a7d316d820b0c25ecdef2ebb584634b
Reviewed-on: https://go-review.googlesource.com/c/sys/+/435095
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Cherry Mui <cherryyz@google.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Ian Lance Taylor <iant@google.com >
2022-09-27 17:03:52 +00:00
Tobias Klauser
8cfa568d3c
unix: allow calling Sendto with nil Sockaddr
...
Same as CL 433504 did for the syscall package.
For golang/go#55845
Change-Id: I3ca2d7fab9da77c304487b4c134a9675da99deca
Reviewed-on: https://go-review.googlesource.com/c/sys/+/434515
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Run-TryBot: Ian Lance Taylor <iant@google.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
2022-09-26 16:39:33 +00:00
Michael Lelli
fb04ddd9f9
windows: add DWM window attribute related syscalls
...
https://docs.microsoft.com/en-us/windows/win32/api/dwmapi/nf-dwmapi-dwmgetwindowattribute
https://docs.microsoft.com/en-us/windows/win32/api/dwmapi/nf-dwmapi-dwmsetwindowattribute
Change-Id: I96a68f91f745601e93c0cc21cc4f1f4c5e7d8b9e
GitHub-Last-Rev: bdbe2ccb22
GitHub-Pull-Request: golang/sys#123
Reviewed-on: https://go-review.googlesource.com/c/sys/+/399135
Reviewed-by: Bryan Mills <bcmills@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Benny Siegert <bsiegert@gmail.com >
Run-TryBot: Benny Siegert <bsiegert@gmail.com >
Reviewed-by: Alex Brainman <alex.brainman@gmail.com >
2022-09-19 09:18:48 +00:00
Tobias Klauser
7b5979e65e
unix: remove Go 1.12 compatibility on darwin
...
Go 1.12 was released more than 3 years ago. Dropping support for it will
simplify generating the wrappers needed for Getdirentries
implementation.
Change-Id: If24bf6ff9076fb4e281948c67bac87744df98d7a
Reviewed-on: https://go-review.googlesource.com/c/sys/+/430176
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Than McIntosh <thanm@google.com >
Reviewed-by: Keith Randall <khr@google.com >
Reviewed-by: Keith Randall <khr@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com >
2022-09-15 20:00:43 +00:00
Dmitri Goutnik
63ea559210
unix: add namespaced versions of Listxattr/Flistxattr/Llistxattr on *BSD
...
Current extended attributes API mixes together attributes from different
namespaces without a way to separate them. Add versions of *listxattr
functions that return attributes only from the specified namespace.
For golang/go#54357
Change-Id: I605d677dd2f2a17541bc02f3146a7509c69269c9
Reviewed-on: https://go-review.googlesource.com/c/sys/+/430215
Reviewed-by: Yuval Pavel Zholkover <paulzhol@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Run-TryBot: Dmitri Goutnik <dgoutnik@gmail.com >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Auto-Submit: Jenny Rakoczy <jenny@golang.org >
Reviewed-by: Jenny Rakoczy <jenny@golang.org >
2022-09-13 17:52:20 +00:00
Tobias Klauser
76c7481b51
all: simplify unsafe.Slice usage in {Byte,UTF16}PtrToString
...
On windows, use unsafe.Slice instead of unsafeheader as already the case
for unix and plan9.
The pointers are already *byte/*uint16, so the type conversion can be
omitted as well.
Change-Id: Ida7264cc0c1948bf563ed91d51e637edcdafb77a
Reviewed-on: https://go-review.googlesource.com/c/sys/+/430515
Reviewed-by: Ian Lance Taylor <iant@google.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Bryan Mills <bcmills@google.com >
2022-09-13 15:31:01 +00:00
Michael Lelli
3275c407ce
windows: add window handle related system calls
...
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-enumwindows
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-enumchildwindows
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getclassnamew
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getdesktopwindow
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getforegroundwindow
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-iswindow
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-iswindowunicode
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-iswindowvisible
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getguithreadinfo
Change-Id: I21fbf47e1f459e86503e0e876b44cf47c98b2aa0
GitHub-Last-Rev: 242b79ffb8
GitHub-Pull-Request: golang/sys#122
Reviewed-on: https://go-review.googlesource.com/c/sys/+/399134
Auto-Submit: Alex Brainman <alex.brainman@gmail.com >
Reviewed-by: Benny Siegert <bsiegert@gmail.com >
Reviewed-by: Than McIntosh <thanm@google.com >
Reviewed-by: Alex Brainman <alex.brainman@gmail.com >
Run-TryBot: Alex Brainman <alex.brainman@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
2022-09-13 12:03:20 +00:00
Tobias Klauser
aba9fc2a8f
unix: use unsafe.Slice instead of unsafeheader package
...
Go 1.18 is the minimum supported Go version and unsafe.Slice was
introduced in Go 1.17.
Change-Id: Ie5f1fad01f219e7b7a190de2c49676f366ad3bc7
Reviewed-on: https://go-review.googlesource.com/c/sys/+/428515
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Benny Siegert <bsiegert@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
2022-09-09 16:24:55 +00:00
Nahum Shalman
27713097b9
unix: fix event port panic after close
...
Fixes golang/go#54363
Change-Id: I38813aefaf58ef91605e0a6e3e6622c8a39d6a8d
Reviewed-on: https://go-review.googlesource.com/c/sys/+/422338
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Michael Knyszek <mknyszek@google.com >
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
2022-09-08 16:41:24 +00:00
Tobias Klauser
7ac13a9a92
unix: don't call t.Fatal from goroutine in TestSendmsgBuffers
...
Change-Id: Iddef23a1fb2fcde4560ec0bb9e9ae0301fef965f
Reviewed-on: https://go-review.googlesource.com/c/sys/+/429415
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Michael Knyszek <mknyszek@google.com >
2022-09-08 15:00:16 +00:00
Tobias Klauser
87db552b00
plan9: use unsafe.Slice instead of unsafeheader package
...
Go 1.18 is the minimum supported Go version and unsafe.Slice was
introduced in Go 1.17.
Change-Id: I696dba9b932c522688ee55fdef43d8776f8afbe1
Reviewed-on: https://go-review.googlesource.com/c/sys/+/428516
Reviewed-by: Benny Siegert <bsiegert@gmail.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
2022-09-07 06:24:15 +00:00
Mateusz Poliwczak
d0df966e69
unix: support all Setuid/Setgid and related syscalls on Linux
...
Fixes golang/go#53444
Change-Id: I284e85f954f1646f7026478987db74993ae06d4a
GitHub-Last-Rev: 490f814484
GitHub-Pull-Request: golang/sys#134
Reviewed-on: https://go-review.googlesource.com/c/sys/+/428174
Reviewed-by: Michael Knyszek <mknyszek@google.com >
Run-TryBot: Ian Lance Taylor <iant@golang.org >
Run-TryBot: Ian Lance Taylor <iant@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
2022-09-06 16:55:34 +00:00
aarzilli
9e1f76180b
x/sys/unix: use uintptr for tracee addresses on FreeBSD
...
Change PtraceLwpInfoStruct, PtraceIoDesc and PtraceIO to not use *byte
to represent addresses that belong to the traced process.
Fixes golang/go#54113
Change-Id: I6efad26046b784d79b83fed4498cac93957274ca
Reviewed-on: https://go-review.googlesource.com/c/sys/+/419915
TryBot-Result: Gopher Robot <gobot@golang.org >
Run-TryBot: Michael Pratt <mpratt@google.com >
Reviewed-by: Russ Cox <rsc@golang.org >
Run-TryBot: Russ Cox <rsc@golang.org >
Auto-Submit: Russ Cox <rsc@golang.org >
2022-09-06 13:54:38 +00:00
Tobias Klauser
d48e67d002
unix: use strconv.Itoa instead of local implementation
...
This was originally copied over from package syscall where it was
replaced by internal/itoa in CL 301549.
For golang.org/x/sys/unix we may import strconv, so use strconv.Itoa
instead.
Change-Id: Iac125fbd0f64c385f9f0c02d4a7af762364b67aa
Reviewed-on: https://go-review.googlesource.com/c/sys/+/425304
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Heschi Kreinick <heschi@google.com >
2022-08-29 20:07:55 +00:00
Tobias Klauser
2c41d75977
unix: add IoctlLoop{Get,Set}Status64 on linux
...
These ioctls are used to get/set the status of a loop device. See
https://man7.org/linux/man-pages/man4/loop.4.html for details.
Change-Id: Ia66db639e6d9326af79954eea5c8f7515aa171d1
Reviewed-on: https://go-review.googlesource.com/c/sys/+/425296
TryBot-Result: Gopher Robot <gobot@golang.org >
Run-TryBot: Ian Lance Taylor <iant@google.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Heschi Kreinick <heschi@google.com >
2022-08-29 20:04:59 +00:00
Nahum Shalman
c680a09ffe
unix: improve solaris event port panic message
...
For golang/go#54254
Change-Id: Id59bacfabc5c818478f6a9af8d585f56f74c2bde
Reviewed-on: https://go-review.googlesource.com/c/sys/+/422099
Reviewed-by: Nahum Shalman <nahamu@gmail.com >
Reviewed-by: Michael Pratt <mpratt@google.com >
Reviewed-by: Robert Griesemer <gri@google.com >
2022-08-25 20:40:02 +00:00
Pure White
20c2bfdbfe
cpu: fix cpu cacheLineSize for arm64 darwin(a.k.a. M1)
...
The existing value for M1 is 64, which is the same as other arm64 cpus.
But the correct cacheLineSize for M1 should be 128, which can be
verified using the following command:
$ sysctl -a hw | grep cachelinesize
hw.cachelinesize: 128
Fixes golang/go#53075
Change-Id: I555716ed412cdc02941c8b1d9767952f7ad6678c
Reviewed-on: https://go-review.googlesource.com/c/sys/+/408614
Run-TryBot: Keith Randall <khr@golang.org >
Reviewed-by: Keith Randall <khr@golang.org >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Joedian Reid <joedian@golang.org >
Reviewed-by: Keith Randall <khr@google.com >
2022-08-23 22:43:34 +00:00
Abirdcfly
2296e01440
windows: remove duplicate words from comments
...
Change-Id: I94748559cc75c052ad3b70f7db4ec330b8a7226d
GitHub-Last-Rev: 43926d3c98
GitHub-Pull-Request: golang/sys#132
Reviewed-on: https://go-review.googlesource.com/c/sys/+/424474
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Reviewed-by: Bryan Mills <bcmills@google.com >
Run-TryBot: Ian Lance Taylor <iant@google.com >
Run-TryBot: hopehook <hopehook@qq.com >
Reviewed-by: hopehook <hopehook@qq.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
2022-08-18 16:13:05 +00:00
Joel Sing
5a390386f1
unix: convert openbsd/arm to direct libc calls
...
The current code has continued to work on OpenBSD, since it has been using
syscall(2) via libc. However, the system call numbers are still hardcoded in
golang.org/x/sys/unix. Various system call changes have been made in OpenBSD,
resulting in changes to the system call numbers and arguments, which now
fail when this package is used.
Switch to calling various system calls directly via libc, rather than calling
via libc using syscall(2).
Updates golang/go#36435
Change-Id: If8e403f0fda7a8b68da71c1f4efba7785b14edf5
Reviewed-on: https://go-review.googlesource.com/c/sys/+/421800
Run-TryBot: Ian Lance Taylor <iant@google.com >
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com >
TryBot-Result: Gopher Robot <gobot@golang.org >
Run-TryBot: Joel Sing <joel@sing.id.au >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
2022-08-17 07:08:43 +00:00
Joel Sing
fbc7d0a398
unix: convert openbsd/386 to direct libc calls
...
The current code has continued to work on OpenBSD, since it has been using
syscall(2) via libc. However, the system call numbers are still hardcoded in
golang.org/sys/unix. Various system call changes have been made in OpenBSD,
resulting in changes to the system call numbers and arguments, which now
fail when this package is used.
Switch to calling various system calls directly via libc, rather than calling
via libc using syscall(2).
Updates golang/go#36435
Change-Id: Ib42d5415ef35c7f7b9cbc55adaf7ca15973ab287
Reviewed-on: https://go-review.googlesource.com/c/sys/+/421798
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Than McIntosh <thanm@google.com >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Reviewed-by: Ian Lance Taylor <iant@google.com >
Run-TryBot: Ian Lance Taylor <iant@google.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
2022-08-11 17:12:46 +00:00
Joel Sing
5f8f0205e4
unix: convert openbsd/amd64 to direct libc calls
...
The current code has continued to work on OpenBSD, since it has been using
syscall(2) via libc. However, the system call numbers are still hardcoded in
golang.org/sys/unix. Various system call changes have been made in OpenBSD,
resulting in changes to the system call numbers and arguments, which now
fail when this package is used.
Switch to calling various system calls directly via libc, rather than calling
via libc using syscall(2).
Updates golang/go#36435
Change-Id: Iadd5734fd4a2421d758883293bd8a6759fc52ca7
Reviewed-on: https://go-review.googlesource.com/c/sys/+/421797
Reviewed-by: Ian Lance Taylor <iant@google.com >
Auto-Submit: Ian Lance Taylor <iant@google.com >
Run-TryBot: Joel Sing <joel@sing.id.au >
TryBot-Result: Gopher Robot <gobot@golang.org >
Reviewed-by: Than McIntosh <thanm@google.com >
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com >
Run-TryBot: Ian Lance Taylor <iant@google.com >
2022-08-11 17:12:45 +00:00