Commit Graph

13 Commits

Author SHA1 Message Date
Hiroshi Ioka
c47cb47a30 x/sys/unix: remove unused constants
Change-Id: Ib80ad194eda478c1e6653a3fe34a20ecf785c6ca
Reviewed-on: https://go-review.googlesource.com/20005
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
2016-10-06 00:19:50 +00:00
kortschak
62bee03759 unix: fix Ppoll for arm64
Fixes golang/go#16065.

Change-Id: I97d06b7038e7c7507e765736899cfa243f45805c
Reviewed-on: https://go-review.googlesource.com/24121
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-06-15 01:27:01 +00:00
kortschak
5a8c7f28c1 unix: add Ppoll support for linux
Use a shim for Poll on arm64.

Fixes golang/go#16052.

Change-Id: I929e7a2293561bddb9355bf65f98bc68b91905b2
Reviewed-on: https://go-review.googlesource.com/24062
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-06-14 16:43:59 +00:00
Riku Voipio
f64b50fbea unix: fix Pause on linux-arm64
Pause is a legacy syscall not available on linux-arm64. Use ppoll with
all args as 0 to emulate - this is the way musl libc does Pause when the
pause syscall isn't available.

With the changes in syscall_linux* and regenerating zsyscall_linux*,
this calling Pause on linux-arm64 works and returns EINTR as expected.

Change-Id: I88236290313f18c742d826e759e86ff260a8b383
Reviewed-on: https://go-review.googlesource.com/22014
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2016-04-15 13:58:44 +00:00
Riku Voipio
324e137580 unix: fix EpollWait for arm64
epoll_wait syscall doesn't exist on arm64. Implement it with
by callign epoll_pwait(). According to man epoll_pwait,
calling epoll_pwait with sigmask of NULL is identical to
epoll_wait.

Testing exposed that EpollEvent needs padding on arm64
like on arm.

This changeset is to fix:
https://github.com/fsnotify/fsnotify/issues/130

Testcase: go test with fsnotify ported from syscall to x/sys:
https://github.com/suihkulokki/fsnotify/tree/go-sys

Change-Id: I76136bf4c82c2ee597549133848f490da46dd488
Reviewed-on: https://go-review.googlesource.com/21971
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-04-13 20:47:32 +00:00
Brad Fitzpatrick
afce3de575 unix: make TimevalToNsec available everywhere
It wasn't in linux/arm.

Tested with:

$ for x in $(go tool dist list ) ; do \
     export GOOS=$(echo $x | cut -d/ -f1); \
     export GOARCH=$(echo $x | cut -d/ -f2); \
     echo "$GOOS; $GOARCH"; go install  .; done

... which all pass, except openbsd/arm which is still broken exactly
how it was broken previously.

Fixes golang/go#14643

Change-Id: Ie7ae861b581b539178de26f15ba3f4bdd0e9b785
Reviewed-on: https://go-review.googlesource.com/21013
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2016-03-22 23:22:43 +00:00
Riku Voipio
9d4e42a206 x/sys/unix: add Dup2 wrapper for arm64/ppc64
arm64 doesn't have a Dup2 syscall, instead Dup3 is supposed
to be used. Since Dup3 is linux-specific, provide a wrapper
to make writing portable code easier.

    Updates golang/go#10235

To verify it, added a testcase for Dup and Dup2.

Change-Id: I066bb60d62b2bd64d7ba0fdfbb334ce2213c78e9
Reviewed-on: https://go-review.googlesource.com/20178
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Riku Voipio <riku.voipio@linaro.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-03-15 15:33:18 +00:00
Riku Voipio
7a56174f00 x/sys/unix: fix time/utime/utimes on arm64
In commit "7e44b69 x/sys/unix: fix invalid syscall on linux/arm"
a test was added for time/utime syscall. This test exposed that
neither time/utime work on arm64, because they call the legacy
syscall "utimes". As a new architecture, arm64 doesn't implement
any legacy syscalls.

Implement by first calling utimensat, using UtimesNano as exampple.

Change-Id: Iffed410730c06ac4c8184241d16eebf08c367524
Reviewed-on: https://go-review.googlesource.com/20174
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
2016-03-03 15:45:59 +00:00
Hiroshi Ioka
7e44b69d78 x/sys/unix: fix invalid syscall on linux/arm
Some system calls are obsolete and no longer available for EABI.
This CL replace such system call usages.

Updates golang/go#14524

Change-Id: Ib99b239455ca677e46d7097911904c45119051bd
Reviewed-on: https://go-review.googlesource.com/19945
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-02-28 22:21:53 +00:00
Dave Cheney
58da1121af unix: use fchownat(2) in place of lchown(2) for linux/arm64
Updates #11918

Replace calls to lchown(2) with fchownat(2) for linux/arm64 as the former
is not suppored.

This is a companion to CL 12833 which is ready to be applied to the main
repo, and verified by CL 12834 which can be applied once this change and
CL 12833 have landed.

Change-Id: I63de3d0da1e4b4e1f253e51e0ed8e0cd0e56d63a
Reviewed-on: https://go-review.googlesource.com/12837
Reviewed-by: Rob Pike <r@golang.org>
2015-07-30 00:44:47 +00:00
Shenghou Ma
379497e3ff unix: add explicit build tags
Change-Id: I62774b8ee0c1a7cc1a3b7009ca860e3fd64a6564
Signed-off-by: Shenghou Ma <minux@golang.org>
Reviewed-on: https://go-review.googlesource.com/10182
Reviewed-by: Rob Pike <r@golang.org>
2015-05-18 19:15:57 +00:00
Ian Lance Taylor
8bcc2dbee4 unix: add arm64 and ppc64le build tags as needed for Go 1.4
Go1.4 does not recognize arm64 and ppc64le as valid GOARCH values, so
we need explicit build tags.

Change-Id: I1a886c132ae398d9f92b2c2b33d2a4827bbdb9d4
Reviewed-on: https://go-review.googlesource.com/10083
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-05-14 20:02:06 +00:00
Ian Lance Taylor
9907ecf448 unix: add arm64/linux support
This incorporates generation script changes from
http://golang.org/cl/7143.

Files generated on Ubuntu Trusty.

Change-Id: I28cfa0993573e1b280c549a67f453c0fb01dee2f
Reviewed-on: https://go-review.googlesource.com/10038
Reviewed-by: Rob Pike <r@golang.org>
2015-05-13 23:16:16 +00:00