mirror of
https://github.com/Tencent/libco.git
synced 2026-01-12 00:05:52 +08:00
fix compile on mac;
This commit is contained in:
@@ -238,7 +238,7 @@ int co_epoll_ctl( int epfd,int op,int fd,struct epoll_event * ev )
|
||||
int ret = 0;
|
||||
struct timespec t = { 0 };
|
||||
|
||||
printf("ptr->events 0x%X\n",ptr->events);
|
||||
// printf("ptr->events 0x%X\n",ptr->events);
|
||||
|
||||
if( EPOLL_CTL_MOD == op )
|
||||
{
|
||||
@@ -255,7 +255,7 @@ int co_epoll_ctl( int epfd,int op,int fd,struct epoll_event * ev )
|
||||
struct kevent kev = { 0 };
|
||||
EV_SET( &kev,fd,EVFILT_WRITE,EV_DELETE,0,0,NULL );
|
||||
ret = kevent( epfd, &kev,1, NULL,0, &t );
|
||||
printf("delete write ret %d\n",ret );
|
||||
// printf("delete write ret %d\n",ret );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -53,6 +53,9 @@ enum EPOLL_EVENTS
|
||||
|
||||
EPOLLERR = 0X008,
|
||||
EPOLLHUP = 0X010,
|
||||
|
||||
EPOLLRDNORM = 0x40,
|
||||
EPOLLWRNORM = 0x004,
|
||||
};
|
||||
#define EPOLL_CTL_ADD 1
|
||||
#define EPOLL_CTL_DEL 2
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/epoll.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include "coctx.h"
|
||||
|
||||
Reference in New Issue
Block a user