linux - EPoll Callback function -
i have question refering following topic: how pass callback function pointer epoll_event structure in c++
i using example , try replace if/else-block 2 callback functions timer , signal. don't know how.
this part of code:
int n = epoll_wait (epollfd, events , num_events, -1 ); (int = 0; < n; ++i) { if (events[i].data.fd == timerfd) { read(....); printf ("timer %...."); } else if (events[i].data.fd == signalfd){ read(); } }
Comments
Post a Comment