Skip to content

Commit

Permalink
fix compile on mac;
Browse files Browse the repository at this point in the history
  • Loading branch information
dengoswei committed Jan 23, 2017
1 parent 808c5c6 commit 6eb80c7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions co_epoll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
{
Expand All @@ -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 );
}
}

Expand Down
3 changes: 3 additions & 0 deletions co_epoll.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion example_copystack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 6eb80c7

Please sign in to comment.