OLD | NEW |
1 // Copyright 2009 The Go Authors. All rights reserved. | 1 // Copyright 2009 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 package syscall | 5 package unix |
6 | 6 |
7 import "unsafe" | 7 import "unsafe" |
8 | 8 |
9 func Getpagesize() int { return 4096 } | 9 func Getpagesize() int { return 4096 } |
10 | 10 |
11 func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nse
c) } | 11 func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nse
c) } |
12 | 12 |
13 func NsecToTimespec(nsec int64) (ts Timespec) { | 13 func NsecToTimespec(nsec int64) (ts Timespec) { |
14 ts.Sec = int32(nsec / 1e9) | 14 ts.Sec = int32(nsec / 1e9) |
15 ts.Nsec = int32(nsec % 1e9) | 15 ts.Nsec = int32(nsec % 1e9) |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 written = int(writtenOut) | 50 written = int(writtenOut) |
51 | 51 |
52 if e1 != 0 { | 52 if e1 != 0 { |
53 err = e1 | 53 err = e1 |
54 } | 54 } |
55 return | 55 return |
56 } | 56 } |
57 | 57 |
58 func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
err Errno) // sic | 58 func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
err Errno) // sic |
OLD | NEW |