Commit 70f6769b authored by Austin Clements's avatar Austin Clements

[dev.cc] runtime: catch defs_linux_power64*.go up to other archs

Fix a constant conversion error.  Add set_{sec,nsec} for
timespec and set_usec for timeval.  Fix type of
sigaltstackt.ss_size.

LGTM=rsc
R=rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/180840043
parent 0da27cb8
...@@ -79,7 +79,7 @@ const ( ...@@ -79,7 +79,7 @@ const (
_EPOLLERR = 0x8 _EPOLLERR = 0x8
_EPOLLHUP = 0x10 _EPOLLHUP = 0x10
_EPOLLRDHUP = 0x2000 _EPOLLRDHUP = 0x2000
_EPOLLET = -0x80000000 _EPOLLET = 0x80000000
_EPOLL_CLOEXEC = 0x80000 _EPOLL_CLOEXEC = 0x80000
_EPOLL_CTL_ADD = 0x1 _EPOLL_CTL_ADD = 0x1
_EPOLL_CTL_DEL = 0x2 _EPOLL_CTL_DEL = 0x2
...@@ -96,11 +96,23 @@ type timespec struct { ...@@ -96,11 +96,23 @@ type timespec struct {
tv_nsec int64 tv_nsec int64
} }
func (ts *timespec) set_sec(x int64) {
ts.tv_sec = x
}
func (ts *timespec) set_nsec(x int32) {
ts.tv_nsec = int64(x)
}
type timeval struct { type timeval struct {
tv_sec int64 tv_sec int64
tv_usec int64 tv_usec int64
} }
func (tv *timeval) set_usec(x int32) {
tv.tv_usec = int64(x)
}
type sigactiont struct { type sigactiont struct {
sa_handler uintptr sa_handler uintptr
sa_flags uint64 sa_flags uint64
...@@ -160,7 +172,7 @@ type sigaltstackt struct { ...@@ -160,7 +172,7 @@ type sigaltstackt struct {
ss_sp *byte ss_sp *byte
ss_flags int32 ss_flags int32
pad_cgo_0 [4]byte pad_cgo_0 [4]byte
ss_size uint64 ss_size uintptr
} }
type sigcontext struct { type sigcontext struct {
......
...@@ -79,7 +79,7 @@ const ( ...@@ -79,7 +79,7 @@ const (
_EPOLLERR = 0x8 _EPOLLERR = 0x8
_EPOLLHUP = 0x10 _EPOLLHUP = 0x10
_EPOLLRDHUP = 0x2000 _EPOLLRDHUP = 0x2000
_EPOLLET = -0x80000000 _EPOLLET = 0x80000000
_EPOLL_CLOEXEC = 0x80000 _EPOLL_CLOEXEC = 0x80000
_EPOLL_CTL_ADD = 0x1 _EPOLL_CTL_ADD = 0x1
_EPOLL_CTL_DEL = 0x2 _EPOLL_CTL_DEL = 0x2
...@@ -96,11 +96,23 @@ type timespec struct { ...@@ -96,11 +96,23 @@ type timespec struct {
tv_nsec int64 tv_nsec int64
} }
func (ts *timespec) set_sec(x int64) {
ts.tv_sec = x
}
func (ts *timespec) set_nsec(x int32) {
ts.tv_nsec = int64(x)
}
type timeval struct { type timeval struct {
tv_sec int64 tv_sec int64
tv_usec int64 tv_usec int64
} }
func (tv *timeval) set_usec(x int32) {
tv.tv_usec = int64(x)
}
type sigactiont struct { type sigactiont struct {
sa_handler uintptr sa_handler uintptr
sa_flags uint64 sa_flags uint64
...@@ -160,7 +172,7 @@ type sigaltstackt struct { ...@@ -160,7 +172,7 @@ type sigaltstackt struct {
ss_sp *byte ss_sp *byte
ss_flags int32 ss_flags int32
pad_cgo_0 [4]byte pad_cgo_0 [4]byte
ss_size uint64 ss_size uintptr
} }
type sigcontext struct { type sigcontext struct {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment