1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

os.notify: implement the kqueue backend for notify.FdNotifier (#19057)

This commit is contained in:
shove
2023-08-05 12:11:07 +08:00
committed by GitHub
parent 4cf8328f71
commit 301320f4b0
3 changed files with 272 additions and 9 deletions

12
vlib/os/notify/kqueue.h Normal file
View File

@@ -0,0 +1,12 @@
#ifndef __KQUEUE_H
#define __KQUEUE_H
#include <sys/event.h>
// Due to the renaming of 'struct kevent' and function 'kevent',
// they are wrapped here to avoid conflicts.
int __kevent__(int handle, const struct kevent* changelist, int nchanges, struct kevent* eventlist, int nevents, const struct timespec* timeout) {
return kevent(handle, changelist, nchanges, eventlist, nevents, timeout);
}
#endif