From e419be223f415008f313e95d6d19f20398bdec9b Mon Sep 17 00:00:00 2001 From: Qiang Huang Date: Mon, 11 Apr 2016 15:01:36 +0800 Subject: [PATCH] Use flag for aarch64 EpollCreate1 Signed-off-by: Qiang Huang --- archutils/epoll_aarch64.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/archutils/epoll_aarch64.go b/archutils/epoll_aarch64.go index b0ea48c..3984ac4 100644 --- a/archutils/epoll_aarch64.go +++ b/archutils/epoll_aarch64.go @@ -5,15 +5,15 @@ package archutils // #include /* int EpollCreate1(int flag) { - return epoll_create1(0); + return epoll_create1(flag); } -int EpollCtl(int efd, int op,int sfd, int Events, int Fd) { +int EpollCtl(int efd, int op, int sfd, int Events, int Fd) { struct epoll_event event; event.events = Events; event.data.fd = Fd; - return epoll_ctl(efd,op,sfd,&event); + return epoll_ctl(efd, op, sfd, &event); } typedef struct Event{ @@ -41,7 +41,7 @@ import ( ) func EpollCreate1(flag int) (int, error) { - fd := int(C.EpollCreate1(0)) + fd := int(C.EpollCreate1(C.int(flag))) if fd < 0 { return fd, fmt.Errorf("failed to create epoll, errno is %d", fd) }