aboutsummaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_arm.go
diff options
context:
space:
mode:
Diffstat (limited to 'Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_arm.go')
-rw-r--r--Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_arm.go34
1 files changed, 32 insertions, 2 deletions
diff --git a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_arm.go b/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_arm.go
index abc41c3ea..71d870228 100644
--- a/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_arm.go
+++ b/Godeps/_workspace/src/golang.org/x/sys/unix/syscall_linux_arm.go
@@ -108,7 +108,28 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
// Vsyscalls on amd64.
//sysnb Gettimeofday(tv *Timeval) (err error)
-//sysnb Time(t *Time_t) (tt Time_t, err error)
+//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
+//sys Pause() (err error)
+
+func Time(t *Time_t) (Time_t, error) {
+ var tv Timeval
+ err := Gettimeofday(&tv)
+ if err != nil {
+ return 0, err
+ }
+ if t != nil {
+ *t = Time_t(tv.Sec)
+ }
+ return Time_t(tv.Sec), nil
+}
+
+func Utime(path string, buf *Utimbuf) error {
+ tv := []Timeval{
+ {Sec: buf.Actime},
+ {Sec: buf.Modtime},
+ }
+ return Utimes(path, tv)
+}
//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
@@ -158,7 +179,7 @@ type rlimit32 struct {
Max uint32
}
-//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT
+//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_UGETRLIMIT
const rlimInf32 = ^uint32(0)
const rlimInf64 = ^uint64(0)
@@ -231,3 +252,12 @@ func (msghdr *Msghdr) SetControllen(length int) {
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
+
+//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
+
+func Poll(fds []PollFd, timeout int) (n int, err error) {
+ if len(fds) == 0 {
+ return poll(nil, 0, timeout)
+ }
+ return poll(&fds[0], len(fds), timeout)
+}