Skip to content

Commit

Permalink
kqueue
Browse files Browse the repository at this point in the history
  • Loading branch information
cheng-zhongliang committed Oct 1, 2023
1 parent 943aa4f commit 572f63f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kqueue.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ func (kq *poller) add(ev *Event) error {
kq.changes = append(kq.changes, syscall.Kevent_t{
Ident: uint64(ev.fd),
Filter: syscall.EVFILT_READ,
Flags: syscall.EV_ADD | syscall.EV_ENABLE | ET,
Flags: syscall.EV_ADD | ET,
Udata: (*byte)(unsafe.Pointer(ev)),
})
}
if ev.events&EvWrite != 0 {
kq.changes = append(kq.changes, syscall.Kevent_t{
Ident: uint64(ev.fd),
Filter: syscall.EVFILT_WRITE,
Flags: syscall.EV_ADD | syscall.EV_ENABLE | ET,
Flags: syscall.EV_ADD | ET,
Udata: (*byte)(unsafe.Pointer(ev)),
})
}
Expand Down

0 comments on commit 572f63f

Please sign in to comment.