ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev.c
(Generate patch)

Comparing libev/ev.c (file contents):
Revision 1.313 by root, Wed Aug 19 23:44:51 2009 UTC vs.
Revision 1.314 by root, Wed Aug 26 17:31:20 2009 UTC

302# define EV_USE_EVENTFD 0 302# define EV_USE_EVENTFD 0
303# endif 303# endif
304#endif 304#endif
305 305
306#ifndef EV_USE_SIGNALFD 306#ifndef EV_USE_SIGNALFD
307# if __linux && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9)) 307# if __linux && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7))
308# define EV_USE_SIGNALFD 1 308# define EV_USE_SIGNALFD 1
309# else 309# else
310# define EV_USE_SIGNALFD 0 310# define EV_USE_SIGNALFD 0
311# endif 311# endif
312#endif 312#endif
402} 402}
403# endif 403# endif
404#endif 404#endif
405 405
406#if EV_USE_SIGNALFD 406#if EV_USE_SIGNALFD
407# include <sys/signalfd.h> 407/* our minimum requirement is glibc 2.7 which has the stub, but not the header */
408# include <stdint.h>
409# ifndef SFD_NONBLOCK
410# define SFD_NONBLOCK O_NONBLOCK
408#endif 411# endif
412# ifndef SFD_CLOEXEC
413# ifdef O_CLOEXEC
414# define SFD_CLOEXEC O_CLOEXEC
415# else
416# define SFD_CLOEXEC 02000000
417# endif
418# endif
419# ifdef __cplusplus
420extern "C" {
421# endif
422int signalfd (int fd, const sigset_t *mask, int flags);
423
424struct signalfd_siginfo
425{
426 uint32_t ssi_signo;
427 char pad[128 - sizeof (uint32_t)];
428};
429# ifdef __cplusplus
430}
431# endif
432#endif
433
409 434
410/**/ 435/**/
411 436
412#if EV_VERIFY >= 3 437#if EV_VERIFY >= 3
413# define EV_FREQUENT_CHECK ev_loop_verify (EV_A) 438# define EV_FREQUENT_CHECK ev_loop_verify (EV_A)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines