summaryrefslogtreecommitdiffhomepage
path: root/pkg/abi/linux
diff options
context:
space:
mode:
authorRahat Mahmood <rahat@google.com>2020-04-23 15:47:59 -0700
committergVisor bot <gvisor-bot@google.com>2020-04-23 15:49:05 -0700
commit93dd47146185ec7004f514e23bad9f225f55efb1 (patch)
tree5df4b95a0b57b3592b79103bf91df0a3a50581a2 /pkg/abi/linux
parent5042ea7e2cbdc0c04fd454583589a3b1e152f95d (diff)
Enable automated marshalling for epoll events.
Ensure we use the correct architecture-specific defintion of epoll event, and use go-marshal for serialization. PiperOrigin-RevId: 308145677
Diffstat (limited to 'pkg/abi/linux')
-rw-r--r--pkg/abi/linux/epoll_amd64.go4
-rw-r--r--pkg/abi/linux/epoll_arm64.go4
2 files changed, 6 insertions, 2 deletions
diff --git a/pkg/abi/linux/epoll_amd64.go b/pkg/abi/linux/epoll_amd64.go
index 34ff18009..7e74b1143 100644
--- a/pkg/abi/linux/epoll_amd64.go
+++ b/pkg/abi/linux/epoll_amd64.go
@@ -12,11 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+// +build amd64
+
package linux
// EpollEvent is equivalent to struct epoll_event from epoll(2).
//
-// +marshal
+// +marshal slice:EpollEventSlice
type EpollEvent struct {
Events uint32
// Linux makes struct epoll_event::data a __u64. We represent it as
diff --git a/pkg/abi/linux/epoll_arm64.go b/pkg/abi/linux/epoll_arm64.go
index f86c35329..a35939cc9 100644
--- a/pkg/abi/linux/epoll_arm64.go
+++ b/pkg/abi/linux/epoll_arm64.go
@@ -12,11 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+// +build arm64
+
package linux
// EpollEvent is equivalent to struct epoll_event from epoll(2).
//
-// +marshal
+// +marshal slice:EpollEventSlice
type EpollEvent struct {
Events uint32
// Linux makes struct epoll_event a __u64, necessitating 4 bytes of padding