# 1 "ev.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "ev.c"
# 45 "ev.c"
# 1 "config.h" 1
# 46 "ev.c" 2
# 167 "ev.c"
# 1 "/usr/include/stdlib.h" 1 3 4
# 25 "/usr/include/stdlib.h" 3 4
# 1 "/usr/include/features.h" 1 3 4
# 361 "/usr/include/features.h" 3 4
# 1 "/usr/include/sys/cdefs.h" 1 3 4
# 365 "/usr/include/sys/cdefs.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 366 "/usr/include/sys/cdefs.h" 2 3 4
# 362 "/usr/include/features.h" 2 3 4
# 385 "/usr/include/features.h" 3 4
# 1 "/usr/include/gnu/stubs.h" 1 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 5 "/usr/include/gnu/stubs.h" 2 3 4
# 1 "/usr/include/gnu/stubs-64.h" 1 3 4
# 10 "/usr/include/gnu/stubs.h" 2 3 4
# 386 "/usr/include/features.h" 2 3 4
# 26 "/usr/include/stdlib.h" 2 3 4
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include/stddef.h" 1 3 4
# 211 "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include/stddef.h" 3 4
typedef long unsigned int size_t;
# 34 "/usr/include/stdlib.h" 2 3 4
extern "C" {
# 1 "/usr/include/bits/waitflags.h" 1 3 4
# 43 "/usr/include/stdlib.h" 2 3 4
# 1 "/usr/include/bits/waitstatus.h" 1 3 4
# 65 "/usr/include/bits/waitstatus.h" 3 4
# 1 "/usr/include/endian.h" 1 3 4
# 37 "/usr/include/endian.h" 3 4
# 1 "/usr/include/bits/endian.h" 1 3 4
# 38 "/usr/include/endian.h" 2 3 4
# 61 "/usr/include/endian.h" 3 4
# 1 "/usr/include/bits/byteswap.h" 1 3 4
# 28 "/usr/include/bits/byteswap.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 29 "/usr/include/bits/byteswap.h" 2 3 4
# 62 "/usr/include/endian.h" 2 3 4
# 66 "/usr/include/bits/waitstatus.h" 2 3 4
union wait
{
int w_status;
struct
{
unsigned int __w_termsig:7;
unsigned int __w_coredump:1;
unsigned int __w_retcode:8;
unsigned int:16;
} __wait_terminated;
struct
{
unsigned int __w_stopval:8;
unsigned int __w_stopsig:8;
unsigned int:16;
} __wait_stopped;
};
# 44 "/usr/include/stdlib.h" 2 3 4
# 96 "/usr/include/stdlib.h" 3 4
typedef struct
{
int quot;
int rem;
} div_t;
typedef struct
{
long int quot;
long int rem;
} ldiv_t;
__extension__ typedef struct
{
long long int quot;
long long int rem;
} lldiv_t;
# 140 "/usr/include/stdlib.h" 3 4
extern size_t __ctype_get_mb_cur_max (void) throw () ;
extern double atof (__const char *__nptr)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
extern int atoi (__const char *__nptr)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
extern long int atol (__const char *__nptr)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
__extension__ extern long long int atoll (__const char *__nptr)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
extern double strtod (__const char *__restrict __nptr,
char **__restrict __endptr)
throw () __attribute__ ((__nonnull__ (1))) ;
extern float strtof (__const char *__restrict __nptr,
char **__restrict __endptr) throw () __attribute__ ((__nonnull__ (1))) ;
extern long double strtold (__const char *__restrict __nptr,
char **__restrict __endptr)
throw () __attribute__ ((__nonnull__ (1))) ;
extern long int strtol (__const char *__restrict __nptr,
char **__restrict __endptr, int __base)
throw () __attribute__ ((__nonnull__ (1))) ;
extern unsigned long int strtoul (__const char *__restrict __nptr,
char **__restrict __endptr, int __base)
throw () __attribute__ ((__nonnull__ (1))) ;
__extension__
extern long long int strtoq (__const char *__restrict __nptr,
char **__restrict __endptr, int __base)
throw () __attribute__ ((__nonnull__ (1))) ;
__extension__
extern unsigned long long int strtouq (__const char *__restrict __nptr,
char **__restrict __endptr, int __base)
throw () __attribute__ ((__nonnull__ (1))) ;
__extension__
extern long long int strtoll (__const char *__restrict __nptr,
char **__restrict __endptr, int __base)
throw () __attribute__ ((__nonnull__ (1))) ;
__extension__
extern unsigned long long int strtoull (__const char *__restrict __nptr,
char **__restrict __endptr, int __base)
throw () __attribute__ ((__nonnull__ (1))) ;
# 236 "/usr/include/stdlib.h" 3 4
# 1 "/usr/include/xlocale.h" 1 3 4
# 28 "/usr/include/xlocale.h" 3 4
typedef struct __locale_struct
{
struct __locale_data *__locales[13];
const unsigned short int *__ctype_b;
const int *__ctype_tolower;
const int *__ctype_toupper;
const char *__names[13];
} *__locale_t;
typedef __locale_t locale_t;
# 237 "/usr/include/stdlib.h" 2 3 4
extern long int strtol_l (__const char *__restrict __nptr,
char **__restrict __endptr, int __base,
__locale_t __loc) throw () __attribute__ ((__nonnull__ (1, 4))) ;
extern unsigned long int strtoul_l (__const char *__restrict __nptr,
char **__restrict __endptr,
int __base, __locale_t __loc)
throw () __attribute__ ((__nonnull__ (1, 4))) ;
__extension__
extern long long int strtoll_l (__const char *__restrict __nptr,
char **__restrict __endptr, int __base,
__locale_t __loc)
throw () __attribute__ ((__nonnull__ (1, 4))) ;
__extension__
extern unsigned long long int strtoull_l (__const char *__restrict __nptr,
char **__restrict __endptr,
int __base, __locale_t __loc)
throw () __attribute__ ((__nonnull__ (1, 4))) ;
extern double strtod_l (__const char *__restrict __nptr,
char **__restrict __endptr, __locale_t __loc)
throw () __attribute__ ((__nonnull__ (1, 3))) ;
extern float strtof_l (__const char *__restrict __nptr,
char **__restrict __endptr, __locale_t __loc)
throw () __attribute__ ((__nonnull__ (1, 3))) ;
extern long double strtold_l (__const char *__restrict __nptr,
char **__restrict __endptr,
__locale_t __loc)
throw () __attribute__ ((__nonnull__ (1, 3))) ;
# 311 "/usr/include/stdlib.h" 3 4
extern char *l64a (long int __n) throw () ;
extern long int a64l (__const char *__s)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) ;
# 1 "/usr/include/sys/types.h" 1 3 4
# 28 "/usr/include/sys/types.h" 3 4
extern "C" {
# 1 "/usr/include/bits/types.h" 1 3 4
# 28 "/usr/include/bits/types.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 29 "/usr/include/bits/types.h" 2 3 4
typedef unsigned char __u_char;
typedef unsigned short int __u_short;
typedef unsigned int __u_int;
typedef unsigned long int __u_long;
typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef signed short int __int16_t;
typedef unsigned short int __uint16_t;
typedef signed int __int32_t;
typedef unsigned int __uint32_t;
typedef signed long int __int64_t;
typedef unsigned long int __uint64_t;
typedef long int __quad_t;
typedef unsigned long int __u_quad_t;
# 131 "/usr/include/bits/types.h" 3 4
# 1 "/usr/include/bits/typesizes.h" 1 3 4
# 132 "/usr/include/bits/types.h" 2 3 4
typedef unsigned long int __dev_t;
typedef unsigned int __uid_t;
typedef unsigned int __gid_t;
typedef unsigned long int __ino_t;
typedef unsigned long int __ino64_t;
typedef unsigned int __mode_t;
typedef unsigned long int __nlink_t;
typedef long int __off_t;
typedef long int __off64_t;
typedef int __pid_t;
typedef struct { int __val[2]; } __fsid_t;
typedef long int __clock_t;
typedef unsigned long int __rlim_t;
typedef unsigned long int __rlim64_t;
typedef unsigned int __id_t;
typedef long int __time_t;
typedef unsigned int __useconds_t;
typedef long int __suseconds_t;
typedef int __daddr_t;
typedef long int __swblk_t;
typedef int __key_t;
typedef int __clockid_t;
typedef void * __timer_t;
typedef long int __blksize_t;
typedef long int __blkcnt_t;
typedef long int __blkcnt64_t;
typedef unsigned long int __fsblkcnt_t;
typedef unsigned long int __fsblkcnt64_t;
typedef unsigned long int __fsfilcnt_t;
typedef unsigned long int __fsfilcnt64_t;
typedef long int __ssize_t;
typedef __off64_t __loff_t;
typedef __quad_t *__qaddr_t;
typedef char *__caddr_t;
typedef long int __intptr_t;
typedef unsigned int __socklen_t;
# 31 "/usr/include/sys/types.h" 2 3 4
typedef __u_char u_char;
typedef __u_short u_short;
typedef __u_int u_int;
typedef __u_long u_long;
typedef __quad_t quad_t;
typedef __u_quad_t u_quad_t;
typedef __fsid_t fsid_t;
typedef __loff_t loff_t;
typedef __ino_t ino_t;
typedef __ino64_t ino64_t;
typedef __dev_t dev_t;
typedef __gid_t gid_t;
typedef __mode_t mode_t;
typedef __nlink_t nlink_t;
typedef __uid_t uid_t;
typedef __off_t off_t;
typedef __off64_t off64_t;
typedef __pid_t pid_t;
typedef __id_t id_t;
typedef __ssize_t ssize_t;
typedef __daddr_t daddr_t;
typedef __caddr_t caddr_t;
typedef __key_t key_t;
# 133 "/usr/include/sys/types.h" 3 4
# 1 "/usr/include/time.h" 1 3 4
# 58 "/usr/include/time.h" 3 4
typedef __clock_t clock_t;
# 74 "/usr/include/time.h" 3 4
typedef __time_t time_t;
# 92 "/usr/include/time.h" 3 4
typedef __clockid_t clockid_t;
# 104 "/usr/include/time.h" 3 4
typedef __timer_t timer_t;
# 134 "/usr/include/sys/types.h" 2 3 4
typedef __useconds_t useconds_t;
typedef __suseconds_t suseconds_t;
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include/stddef.h" 1 3 4
# 148 "/usr/include/sys/types.h" 2 3 4
typedef unsigned long int ulong;
typedef unsigned short int ushort;
typedef unsigned int uint;
# 195 "/usr/include/sys/types.h" 3 4
typedef int int8_t __attribute__ ((__mode__ (__QI__)));
typedef int int16_t __attribute__ ((__mode__ (__HI__)));
typedef int int32_t __attribute__ ((__mode__ (__SI__)));
typedef int int64_t __attribute__ ((__mode__ (__DI__)));
typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
typedef int register_t __attribute__ ((__mode__ (__word__)));
# 220 "/usr/include/sys/types.h" 3 4
# 1 "/usr/include/sys/select.h" 1 3 4
# 31 "/usr/include/sys/select.h" 3 4
# 1 "/usr/include/bits/select.h" 1 3 4
# 23 "/usr/include/bits/select.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 24 "/usr/include/bits/select.h" 2 3 4
# 32 "/usr/include/sys/select.h" 2 3 4
# 1 "/usr/include/bits/sigset.h" 1 3 4
# 24 "/usr/include/bits/sigset.h" 3 4
typedef int __sig_atomic_t;
typedef struct
{
unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
} __sigset_t;
# 35 "/usr/include/sys/select.h" 2 3 4
typedef __sigset_t sigset_t;
# 1 "/usr/include/time.h" 1 3 4
# 120 "/usr/include/time.h" 3 4
struct timespec
{
__time_t tv_sec;
long int tv_nsec;
};
# 45 "/usr/include/sys/select.h" 2 3 4
# 1 "/usr/include/bits/time.h" 1 3 4
# 75 "/usr/include/bits/time.h" 3 4
struct timeval
{
__time_t tv_sec;
__suseconds_t tv_usec;
};
# 47 "/usr/include/sys/select.h" 2 3 4
# 55 "/usr/include/sys/select.h" 3 4
typedef long int __fd_mask;
# 67 "/usr/include/sys/select.h" 3 4
typedef struct
{
__fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))];
} fd_set;
typedef __fd_mask fd_mask;
# 99 "/usr/include/sys/select.h" 3 4
extern "C" {
# 109 "/usr/include/sys/select.h" 3 4
extern int select (int __nfds, fd_set *__restrict __readfds,
fd_set *__restrict __writefds,
fd_set *__restrict __exceptfds,
struct timeval *__restrict __timeout);
# 121 "/usr/include/sys/select.h" 3 4
extern int pselect (int __nfds, fd_set *__restrict __readfds,
fd_set *__restrict __writefds,
fd_set *__restrict __exceptfds,
const struct timespec *__restrict __timeout,
const __sigset_t *__restrict __sigmask);
}
# 221 "/usr/include/sys/types.h" 2 3 4
# 1 "/usr/include/sys/sysmacros.h" 1 3 4
# 30 "/usr/include/sys/sysmacros.h" 3 4
__extension__
extern unsigned int gnu_dev_major (unsigned long long int __dev)
throw ();
__extension__
extern unsigned int gnu_dev_minor (unsigned long long int __dev)
throw ();
__extension__
extern unsigned long long int gnu_dev_makedev (unsigned int __major,
unsigned int __minor)
throw ();
# 224 "/usr/include/sys/types.h" 2 3 4
typedef __blksize_t blksize_t;
typedef __blkcnt_t blkcnt_t;
typedef __fsblkcnt_t fsblkcnt_t;
typedef __fsfilcnt_t fsfilcnt_t;
# 263 "/usr/include/sys/types.h" 3 4
typedef __blkcnt64_t blkcnt64_t;
typedef __fsblkcnt64_t fsblkcnt64_t;
typedef __fsfilcnt64_t fsfilcnt64_t;
# 1 "/usr/include/bits/pthreadtypes.h" 1 3 4
# 23 "/usr/include/bits/pthreadtypes.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 24 "/usr/include/bits/pthreadtypes.h" 2 3 4
# 50 "/usr/include/bits/pthreadtypes.h" 3 4
typedef unsigned long int pthread_t;
typedef union
{
char __size[56];
long int __align;
} pthread_attr_t;
typedef struct __pthread_internal_list
{
struct __pthread_internal_list *__prev;
struct __pthread_internal_list *__next;
} __pthread_list_t;
# 76 "/usr/include/bits/pthreadtypes.h" 3 4
typedef union
{
struct __pthread_mutex_s
{
int __lock;
unsigned int __count;
int __owner;
unsigned int __nusers;
int __kind;
int __spins;
__pthread_list_t __list;
# 101 "/usr/include/bits/pthreadtypes.h" 3 4
} __data;
char __size[40];
long int __align;
} pthread_mutex_t;
typedef union
{
char __size[4];
int __align;
} pthread_mutexattr_t;
typedef union
{
struct
{
int __lock;
unsigned int __futex;
__extension__ unsigned long long int __total_seq;
__extension__ unsigned long long int __wakeup_seq;
__extension__ unsigned long long int __woken_seq;
void *__mutex;
unsigned int __nwaiters;
unsigned int __broadcast_seq;
} __data;
char __size[48];
__extension__ long long int __align;
} pthread_cond_t;
typedef union
{
char __size[4];
int __align;
} pthread_condattr_t;
typedef unsigned int pthread_key_t;
typedef int pthread_once_t;
typedef union
{
struct
{
int __lock;
unsigned int __nr_readers;
unsigned int __readers_wakeup;
unsigned int __writer_wakeup;
unsigned int __nr_readers_queued;
unsigned int __nr_writers_queued;
int __writer;
int __shared;
unsigned long int __pad1;
unsigned long int __pad2;
unsigned int __flags;
} __data;
# 187 "/usr/include/bits/pthreadtypes.h" 3 4
char __size[56];
long int __align;
} pthread_rwlock_t;
typedef union
{
char __size[8];
long int __align;
} pthread_rwlockattr_t;
typedef volatile int pthread_spinlock_t;
typedef union
{
char __size[32];
long int __align;
} pthread_barrier_t;
typedef union
{
char __size[4];
int __align;
} pthread_barrierattr_t;
# 272 "/usr/include/sys/types.h" 2 3 4
}
# 321 "/usr/include/stdlib.h" 2 3 4
extern long int random (void) throw ();
extern void srandom (unsigned int __seed) throw ();
extern char *initstate (unsigned int __seed, char *__statebuf,
size_t __statelen) throw () __attribute__ ((__nonnull__ (2)));
extern char *setstate (char *__statebuf) throw () __attribute__ ((__nonnull__ (1)));
struct random_data
{
int32_t *fptr;
int32_t *rptr;
int32_t *state;
int rand_type;
int rand_deg;
int rand_sep;
int32_t *end_ptr;
};
extern int random_r (struct random_data *__restrict __buf,
int32_t *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2)));
extern int srandom_r (unsigned int __seed, struct random_data *__buf)
throw () __attribute__ ((__nonnull__ (2)));
extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
size_t __statelen,
struct random_data *__restrict __buf)
throw () __attribute__ ((__nonnull__ (2, 4)));
extern int setstate_r (char *__restrict __statebuf,
struct random_data *__restrict __buf)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int rand (void) throw ();
extern void srand (unsigned int __seed) throw ();
extern int rand_r (unsigned int *__seed) throw ();
extern double drand48 (void) throw ();
extern double erand48 (unsigned short int __xsubi[3]) throw () __attribute__ ((__nonnull__ (1)));
extern long int lrand48 (void) throw ();
extern long int nrand48 (unsigned short int __xsubi[3])
throw () __attribute__ ((__nonnull__ (1)));
extern long int mrand48 (void) throw ();
extern long int jrand48 (unsigned short int __xsubi[3])
throw () __attribute__ ((__nonnull__ (1)));
extern void srand48 (long int __seedval) throw ();
extern unsigned short int *seed48 (unsigned short int __seed16v[3])
throw () __attribute__ ((__nonnull__ (1)));
extern void lcong48 (unsigned short int __param[7]) throw () __attribute__ ((__nonnull__ (1)));
struct drand48_data
{
unsigned short int __x[3];
unsigned short int __old_x[3];
unsigned short int __c;
unsigned short int __init;
unsigned long long int __a;
};
extern int drand48_r (struct drand48_data *__restrict __buffer,
double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2)));
extern int erand48_r (unsigned short int __xsubi[3],
struct drand48_data *__restrict __buffer,
double *__restrict __result) throw () __attribute__ ((__nonnull__ (1, 2)));
extern int lrand48_r (struct drand48_data *__restrict __buffer,
long int *__restrict __result)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int nrand48_r (unsigned short int __xsubi[3],
struct drand48_data *__restrict __buffer,
long int *__restrict __result)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int mrand48_r (struct drand48_data *__restrict __buffer,
long int *__restrict __result)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int jrand48_r (unsigned short int __xsubi[3],
struct drand48_data *__restrict __buffer,
long int *__restrict __result)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
throw () __attribute__ ((__nonnull__ (2)));
extern int seed48_r (unsigned short int __seed16v[3],
struct drand48_data *__buffer) throw () __attribute__ ((__nonnull__ (1, 2)));
extern int lcong48_r (unsigned short int __param[7],
struct drand48_data *__buffer)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern void *malloc (size_t __size) throw () __attribute__ ((__malloc__)) ;
extern void *calloc (size_t __nmemb, size_t __size)
throw () __attribute__ ((__malloc__)) ;
extern void *realloc (void *__ptr, size_t __size)
throw () __attribute__ ((__warn_unused_result__));
extern void free (void *__ptr) throw ();
extern void cfree (void *__ptr) throw ();
# 1 "/usr/include/alloca.h" 1 3 4
# 25 "/usr/include/alloca.h" 3 4
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include/stddef.h" 1 3 4
# 26 "/usr/include/alloca.h" 2 3 4
extern "C" {
extern void *alloca (size_t __size) throw ();
}
# 498 "/usr/include/stdlib.h" 2 3 4
extern void *valloc (size_t __size) throw () __attribute__ ((__malloc__)) ;
extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
throw () __attribute__ ((__nonnull__ (1))) ;
extern void abort (void) throw () __attribute__ ((__noreturn__));
extern int atexit (void (*__func) (void)) throw () __attribute__ ((__nonnull__ (1)));
extern "C++" int at_quick_exit (void (*__func) (void))
throw () __asm ("at_quick_exit") __attribute__ ((__nonnull__ (1)));
extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
throw () __attribute__ ((__nonnull__ (1)));
extern void exit (int __status) throw () __attribute__ ((__noreturn__));
extern void quick_exit (int __status) throw () __attribute__ ((__noreturn__));
extern void _Exit (int __status) throw () __attribute__ ((__noreturn__));
extern char *getenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1))) ;
extern char *__secure_getenv (__const char *__name)
throw () __attribute__ ((__nonnull__ (1))) ;
extern int putenv (char *__string) throw () __attribute__ ((__nonnull__ (1)));
extern int setenv (__const char *__name, __const char *__value, int __replace)
throw () __attribute__ ((__nonnull__ (2)));
extern int unsetenv (__const char *__name) throw () __attribute__ ((__nonnull__ (1)));
extern int clearenv (void) throw ();
# 606 "/usr/include/stdlib.h" 3 4
extern char *mktemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ;
# 620 "/usr/include/stdlib.h" 3 4
extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) ;
# 630 "/usr/include/stdlib.h" 3 4
extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) ;
# 642 "/usr/include/stdlib.h" 3 4
extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) ;
# 652 "/usr/include/stdlib.h" 3 4
extern int mkstemps64 (char *__template, int __suffixlen)
__attribute__ ((__nonnull__ (1))) ;
# 663 "/usr/include/stdlib.h" 3 4
extern char *mkdtemp (char *__template) throw () __attribute__ ((__nonnull__ (1))) ;
# 674 "/usr/include/stdlib.h" 3 4
extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) ;
# 684 "/usr/include/stdlib.h" 3 4
extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) ;
# 694 "/usr/include/stdlib.h" 3 4
extern int mkostemps (char *__template, int __suffixlen, int __flags)
__attribute__ ((__nonnull__ (1))) ;
# 706 "/usr/include/stdlib.h" 3 4
extern int mkostemps64 (char *__template, int __suffixlen, int __flags)
__attribute__ ((__nonnull__ (1))) ;
extern int system (__const char *__command) ;
extern char *canonicalize_file_name (__const char *__name)
throw () __attribute__ ((__nonnull__ (1))) ;
# 734 "/usr/include/stdlib.h" 3 4
extern char *realpath (__const char *__restrict __name,
char *__restrict __resolved) throw () ;
typedef int (*__compar_fn_t) (__const void *, __const void *);
typedef __compar_fn_t comparison_fn_t;
typedef int (*__compar_d_fn_t) (__const void *, __const void *, void *);
extern void *bsearch (__const void *__key, __const void *__base,
size_t __nmemb, size_t __size, __compar_fn_t __compar)
__attribute__ ((__nonnull__ (1, 2, 5))) ;
extern void qsort (void *__base, size_t __nmemb, size_t __size,
__compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
extern void qsort_r (void *__base, size_t __nmemb, size_t __size,
__compar_d_fn_t __compar, void *__arg)
__attribute__ ((__nonnull__ (1, 4)));
extern int abs (int __x) throw () __attribute__ ((__const__)) ;
extern long int labs (long int __x) throw () __attribute__ ((__const__)) ;
__extension__ extern long long int llabs (long long int __x)
throw () __attribute__ ((__const__)) ;
extern div_t div (int __numer, int __denom)
throw () __attribute__ ((__const__)) ;
extern ldiv_t ldiv (long int __numer, long int __denom)
throw () __attribute__ ((__const__)) ;
__extension__ extern lldiv_t lldiv (long long int __numer,
long long int __denom)
throw () __attribute__ ((__const__)) ;
# 808 "/usr/include/stdlib.h" 3 4
extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ;
extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
int *__restrict __sign) throw () __attribute__ ((__nonnull__ (3, 4))) ;
extern char *gcvt (double __value, int __ndigit, char *__buf)
throw () __attribute__ ((__nonnull__ (3))) ;
extern char *qecvt (long double __value, int __ndigit,
int *__restrict __decpt, int *__restrict __sign)
throw () __attribute__ ((__nonnull__ (3, 4))) ;
extern char *qfcvt (long double __value, int __ndigit,
int *__restrict __decpt, int *__restrict __sign)
throw () __attribute__ ((__nonnull__ (3, 4))) ;
extern char *qgcvt (long double __value, int __ndigit, char *__buf)
throw () __attribute__ ((__nonnull__ (3))) ;
extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
int *__restrict __sign, char *__restrict __buf,
size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5)));
extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
int *__restrict __sign, char *__restrict __buf,
size_t __len) throw () __attribute__ ((__nonnull__ (3, 4, 5)));
extern int qecvt_r (long double __value, int __ndigit,
int *__restrict __decpt, int *__restrict __sign,
char *__restrict __buf, size_t __len)
throw () __attribute__ ((__nonnull__ (3, 4, 5)));
extern int qfcvt_r (long double __value, int __ndigit,
int *__restrict __decpt, int *__restrict __sign,
char *__restrict __buf, size_t __len)
throw () __attribute__ ((__nonnull__ (3, 4, 5)));
extern int mblen (__const char *__s, size_t __n) throw () ;
extern int mbtowc (wchar_t *__restrict __pwc,
__const char *__restrict __s, size_t __n) throw () ;
extern int wctomb (char *__s, wchar_t __wchar) throw () ;
extern size_t mbstowcs (wchar_t *__restrict __pwcs,
__const char *__restrict __s, size_t __n) throw ();
extern size_t wcstombs (char *__restrict __s,
__const wchar_t *__restrict __pwcs, size_t __n)
throw ();
extern int rpmatch (__const char *__response) throw () __attribute__ ((__nonnull__ (1))) ;
# 896 "/usr/include/stdlib.h" 3 4
extern int getsubopt (char **__restrict __optionp,
char *__const *__restrict __tokens,
char **__restrict __valuep)
throw () __attribute__ ((__nonnull__ (1, 2, 3))) ;
extern void setkey (__const char *__key) throw () __attribute__ ((__nonnull__ (1)));
extern int posix_openpt (int __oflag) ;
extern int grantpt (int __fd) throw ();
extern int unlockpt (int __fd) throw ();
extern char *ptsname (int __fd) throw () ;
extern int ptsname_r (int __fd, char *__buf, size_t __buflen)
throw () __attribute__ ((__nonnull__ (2)));
extern int getpt (void);
extern int getloadavg (double __loadavg[], int __nelem)
throw () __attribute__ ((__nonnull__ (1)));
# 964 "/usr/include/stdlib.h" 3 4
}
# 168 "ev.c" 2
# 1 "/usr/include/string.h" 1 3 4
# 29 "/usr/include/string.h" 3 4
extern "C" {
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include/stddef.h" 1 3 4
# 35 "/usr/include/string.h" 2 3 4
extern void *memcpy (void *__restrict __dest,
__const void *__restrict __src, size_t __n)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern void *memmove (void *__dest, __const void *__src, size_t __n)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern void *memccpy (void *__restrict __dest, __const void *__restrict __src,
int __c, size_t __n)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern void *memset (void *__s, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
extern int memcmp (__const void *__s1, __const void *__s2, size_t __n)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern "C++"
{
extern void *memchr (void *__s, int __c, size_t __n)
throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern __const void *memchr (__const void *__s, int __c, size_t __n)
throw () __asm ("memchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
# 93 "/usr/include/string.h" 3 4
}
extern "C++" void *rawmemchr (void *__s, int __c)
throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern "C++" __const void *rawmemchr (__const void *__s, int __c)
throw () __asm ("rawmemchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern "C++" void *memrchr (void *__s, int __c, size_t __n)
throw () __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern "C++" __const void *memrchr (__const void *__s, int __c, size_t __n)
throw () __asm ("memrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern char *strncpy (char *__restrict __dest,
__const char *__restrict __src, size_t __n)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern char *strcat (char *__restrict __dest, __const char *__restrict __src)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern char *strncat (char *__restrict __dest, __const char *__restrict __src,
size_t __n) throw () __attribute__ ((__nonnull__ (1, 2)));
extern int strcmp (__const char *__s1, __const char *__s2)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern int strncmp (__const char *__s1, __const char *__s2, size_t __n)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern int strcoll (__const char *__s1, __const char *__s2)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern size_t strxfrm (char *__restrict __dest,
__const char *__restrict __src, size_t __n)
throw () __attribute__ ((__nonnull__ (2)));
# 165 "/usr/include/string.h" 3 4
extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n,
__locale_t __l) throw () __attribute__ ((__nonnull__ (2, 4)));
extern char *strdup (__const char *__s)
throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
extern char *strndup (__const char *__string, size_t __n)
throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
# 210 "/usr/include/string.h" 3 4
extern "C++"
{
extern char *strchr (char *__s, int __c)
throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern __const char *strchr (__const char *__s, int __c)
throw () __asm ("strchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
# 233 "/usr/include/string.h" 3 4
}
extern "C++"
{
extern char *strrchr (char *__s, int __c)
throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern __const char *strrchr (__const char *__s, int __c)
throw () __asm ("strrchr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
# 260 "/usr/include/string.h" 3 4
}
extern "C++" char *strchrnul (char *__s, int __c)
throw () __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern "C++" __const char *strchrnul (__const char *__s, int __c)
throw () __asm ("strchrnul") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern size_t strcspn (__const char *__s, __const char *__reject)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern size_t strspn (__const char *__s, __const char *__accept)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern "C++"
{
extern char *strpbrk (char *__s, __const char *__accept)
throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern __const char *strpbrk (__const char *__s, __const char *__accept)
throw () __asm ("strpbrk") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
# 312 "/usr/include/string.h" 3 4
}
extern "C++"
{
extern char *strstr (char *__haystack, __const char *__needle)
throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern __const char *strstr (__const char *__haystack,
__const char *__needle)
throw () __asm ("strstr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
# 340 "/usr/include/string.h" 3 4
}
extern char *strtok (char *__restrict __s, __const char *__restrict __delim)
throw () __attribute__ ((__nonnull__ (2)));
extern char *__strtok_r (char *__restrict __s,
__const char *__restrict __delim,
char **__restrict __save_ptr)
throw () __attribute__ ((__nonnull__ (2, 3)));
extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim,
char **__restrict __save_ptr)
throw () __attribute__ ((__nonnull__ (2, 3)));
extern "C++" char *strcasestr (char *__haystack, __const char *__needle)
throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern "C++" __const char *strcasestr (__const char *__haystack,
__const char *__needle)
throw () __asm ("strcasestr") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
# 382 "/usr/include/string.h" 3 4
extern void *memmem (__const void *__haystack, size_t __haystacklen,
__const void *__needle, size_t __needlelen)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3)));
extern void *__mempcpy (void *__restrict __dest,
__const void *__restrict __src, size_t __n)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern void *mempcpy (void *__restrict __dest,
__const void *__restrict __src, size_t __n)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern size_t strlen (__const char *__s)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern size_t strnlen (__const char *__string, size_t __maxlen)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern char *strerror (int __errnum) throw ();
# 438 "/usr/include/string.h" 3 4
extern char *strerror_r (int __errnum, char *__buf, size_t __buflen)
throw () __attribute__ ((__nonnull__ (2)));
extern char *strerror_l (int __errnum, __locale_t __l) throw ();
extern void __bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
extern void bcopy (__const void *__src, void *__dest, size_t __n)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern void bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern "C++"
{
extern char *index (char *__s, int __c)
throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern __const char *index (__const char *__s, int __c)
throw () __asm ("index") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
# 487 "/usr/include/string.h" 3 4
}
extern "C++"
{
extern char *rindex (char *__s, int __c)
throw () __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
extern __const char *rindex (__const char *__s, int __c)
throw () __asm ("rindex") __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
# 515 "/usr/include/string.h" 3 4
}
extern int ffs (int __i) throw () __attribute__ ((__const__));
extern int ffsl (long int __l) throw () __attribute__ ((__const__));
__extension__ extern int ffsll (long long int __ll)
throw () __attribute__ ((__const__));
extern int strcasecmp (__const char *__s1, __const char *__s2)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern int strcasecmp_l (__const char *__s1, __const char *__s2,
__locale_t __loc)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
extern int strncasecmp_l (__const char *__s1, __const char *__s2,
size_t __n, __locale_t __loc)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4)));
extern char *strsep (char **__restrict __stringp,
__const char *__restrict __delim)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern char *strsignal (int __sig) throw ();
extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern char *__stpncpy (char *__restrict __dest,
__const char *__restrict __src, size_t __n)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern char *stpncpy (char *__restrict __dest,
__const char *__restrict __src, size_t __n)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int strverscmp (__const char *__s1, __const char *__s2)
throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
extern char *strfry (char *__string) throw () __attribute__ ((__nonnull__ (1)));
extern void *memfrob (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1)));
extern "C++" char *basename (char *__filename)
throw () __asm ("basename") __attribute__ ((__nonnull__ (1)));
extern "C++" __const char *basename (__const char *__filename)
throw () __asm ("basename") __attribute__ ((__nonnull__ (1)));
# 646 "/usr/include/string.h" 3 4
}
# 169 "ev.c" 2
# 1 "/usr/include/fcntl.h" 1 3 4
# 30 "/usr/include/fcntl.h" 3 4
extern "C" {
# 1 "/usr/include/bits/fcntl.h" 1 3 4
# 26 "/usr/include/bits/fcntl.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 27 "/usr/include/bits/fcntl.h" 2 3 4
# 1 "/usr/include/bits/uio.h" 1 3 4
# 44 "/usr/include/bits/uio.h" 3 4
struct iovec
{
void *iov_base;
size_t iov_len;
};
# 29 "/usr/include/bits/fcntl.h" 2 3 4
# 165 "/usr/include/bits/fcntl.h" 3 4
struct flock
{
short int l_type;
short int l_whence;
__off_t l_start;
__off_t l_len;
__pid_t l_pid;
};
struct flock64
{
short int l_type;
short int l_whence;
__off64_t l_start;
__off64_t l_len;
__pid_t l_pid;
};
enum __pid_type
{
F_OWNER_TID = 0,
F_OWNER_PID,
F_OWNER_PGRP,
F_OWNER_GID = F_OWNER_PGRP
};
struct f_owner_ex
{
enum __pid_type type;
__pid_t pid;
};
# 250 "/usr/include/bits/fcntl.h" 3 4
extern "C" {
extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
throw ();
extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
unsigned int __flags);
extern ssize_t vmsplice (int __fdout, const struct iovec *__iov,
size_t __count, unsigned int __flags);
extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
__off64_t *__offout, size_t __len,
unsigned int __flags);
extern ssize_t tee (int __fdin, int __fdout, size_t __len,
unsigned int __flags);
extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
# 290 "/usr/include/bits/fcntl.h" 3 4
extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
__off64_t __len);
}
# 35 "/usr/include/fcntl.h" 2 3 4
# 1 "/usr/include/time.h" 1 3 4
# 41 "/usr/include/fcntl.h" 2 3 4
# 1 "/usr/include/bits/stat.h" 1 3 4
# 46 "/usr/include/bits/stat.h" 3 4
struct stat
{
__dev_t st_dev;
__ino_t st_ino;
__nlink_t st_nlink;
__mode_t st_mode;
__uid_t st_uid;
__gid_t st_gid;
int __pad0;
__dev_t st_rdev;
__off_t st_size;
__blksize_t st_blksize;
__blkcnt_t st_blocks;
# 91 "/usr/include/bits/stat.h" 3 4
struct timespec st_atim;
struct timespec st_mtim;
struct timespec st_ctim;
# 106 "/usr/include/bits/stat.h" 3 4
long int __unused[3];
# 115 "/usr/include/bits/stat.h" 3 4
};
struct stat64
{
__dev_t st_dev;
__ino64_t st_ino;
__nlink_t st_nlink;
__mode_t st_mode;
__uid_t st_uid;
__gid_t st_gid;
int __pad0;
__dev_t st_rdev;
__off_t st_size;
__blksize_t st_blksize;
__blkcnt64_t st_blocks;
struct timespec st_atim;
struct timespec st_mtim;
struct timespec st_ctim;
# 167 "/usr/include/bits/stat.h" 3 4
long int __unused[3];
};
# 42 "/usr/include/fcntl.h" 2 3 4
# 122 "/usr/include/fcntl.h" 3 4
extern int fcntl (int __fd, int __cmd, ...);
# 131 "/usr/include/fcntl.h" 3 4
extern int open (__const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (1)));
# 141 "/usr/include/fcntl.h" 3 4
extern int open64 (__const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (1)));
# 155 "/usr/include/fcntl.h" 3 4
extern int openat (int __fd, __const char *__file, int __oflag, ...)
__attribute__ ((__nonnull__ (2)));
# 166 "/usr/include/fcntl.h" 3 4
extern int openat64 (int __fd, __const char *__file, int __oflag, ...)
__attribute__ ((__nonnull__ (2)));
# 177 "/usr/include/fcntl.h" 3 4
extern int creat (__const char *__file, __mode_t __mode) __attribute__ ((__nonnull__ (1)));
# 187 "/usr/include/fcntl.h" 3 4
extern int creat64 (__const char *__file, __mode_t __mode) __attribute__ ((__nonnull__ (1)));
# 206 "/usr/include/fcntl.h" 3 4
extern int lockf (int __fd, int __cmd, __off_t __len);
# 215 "/usr/include/fcntl.h" 3 4
extern int lockf64 (int __fd, int __cmd, __off64_t __len);
extern int posix_fadvise (int __fd, __off_t __offset, __off_t __len,
int __advise) throw ();
# 235 "/usr/include/fcntl.h" 3 4
extern int posix_fadvise64 (int __fd, __off64_t __offset, __off64_t __len,
int __advise) throw ();
# 245 "/usr/include/fcntl.h" 3 4
extern int posix_fallocate (int __fd, __off_t __offset, __off_t __len);
# 256 "/usr/include/fcntl.h" 3 4
extern int posix_fallocate64 (int __fd, __off64_t __offset, __off64_t __len);
# 267 "/usr/include/fcntl.h" 3 4
}
# 170 "ev.c" 2
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include/stddef.h" 1 3 4
# 149 "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include/stddef.h" 3 4
typedef long int ptrdiff_t;
# 171 "ev.c" 2
# 1 "/usr/include/stdio.h" 1 3 4
# 30 "/usr/include/stdio.h" 3 4
extern "C" {
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include/stddef.h" 1 3 4
# 35 "/usr/include/stdio.h" 2 3 4
# 45 "/usr/include/stdio.h" 3 4
struct _IO_FILE;
typedef struct _IO_FILE FILE;
# 65 "/usr/include/stdio.h" 3 4
typedef struct _IO_FILE __FILE;
# 75 "/usr/include/stdio.h" 3 4
# 1 "/usr/include/libio.h" 1 3 4
# 32 "/usr/include/libio.h" 3 4
# 1 "/usr/include/_G_config.h" 1 3 4
# 15 "/usr/include/_G_config.h" 3 4
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include/stddef.h" 1 3 4
# 16 "/usr/include/_G_config.h" 2 3 4
# 1 "/usr/include/wchar.h" 1 3 4
# 83 "/usr/include/wchar.h" 3 4
typedef struct
{
int __count;
union
{
unsigned int __wch;
char __wchb[4];
} __value;
} __mbstate_t;
# 21 "/usr/include/_G_config.h" 2 3 4
typedef struct
{
__off_t __pos;
__mbstate_t __state;
} _G_fpos_t;
typedef struct
{
__off64_t __pos;
__mbstate_t __state;
} _G_fpos64_t;
# 53 "/usr/include/_G_config.h" 3 4
typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
# 33 "/usr/include/libio.h" 2 3 4
# 53 "/usr/include/libio.h" 3 4
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include/stdarg.h" 1 3 4
# 40 "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include/stdarg.h" 3 4
typedef __builtin_va_list __gnuc_va_list;
# 54 "/usr/include/libio.h" 2 3 4
# 170 "/usr/include/libio.h" 3 4
struct _IO_jump_t; struct _IO_FILE;
# 180 "/usr/include/libio.h" 3 4
typedef void _IO_lock_t;
struct _IO_marker {
struct _IO_marker *_next;
struct _IO_FILE *_sbuf;
int _pos;
# 203 "/usr/include/libio.h" 3 4
};
enum __codecvt_result
{
__codecvt_ok,
__codecvt_partial,
__codecvt_error,
__codecvt_noconv
};
# 271 "/usr/include/libio.h" 3 4
struct _IO_FILE {
int _flags;
char* _IO_read_ptr;
char* _IO_read_end;
char* _IO_read_base;
char* _IO_write_base;
char* _IO_write_ptr;
char* _IO_write_end;
char* _IO_buf_base;
char* _IO_buf_end;
char *_IO_save_base;
char *_IO_backup_base;
char *_IO_save_end;
struct _IO_marker *_markers;
struct _IO_FILE *_chain;
int _fileno;
int _flags2;
__off_t _old_offset;
unsigned short _cur_column;
signed char _vtable_offset;
char _shortbuf[1];
_IO_lock_t *_lock;
# 319 "/usr/include/libio.h" 3 4
__off64_t _offset;
# 328 "/usr/include/libio.h" 3 4
void *__pad1;
void *__pad2;
void *__pad3;
void *__pad4;
size_t __pad5;
int _mode;
char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
};
struct _IO_FILE_plus;
extern struct _IO_FILE_plus _IO_2_1_stdin_;
extern struct _IO_FILE_plus _IO_2_1_stdout_;
extern struct _IO_FILE_plus _IO_2_1_stderr_;
# 364 "/usr/include/libio.h" 3 4
typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf,
size_t __n);
typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);
typedef int __io_close_fn (void *__cookie);
typedef __io_read_fn cookie_read_function_t;
typedef __io_write_fn cookie_write_function_t;
typedef __io_seek_fn cookie_seek_function_t;
typedef __io_close_fn cookie_close_function_t;
typedef struct
{
__io_read_fn *read;
__io_write_fn *write;
__io_seek_fn *seek;
__io_close_fn *close;
} _IO_cookie_io_functions_t;
typedef _IO_cookie_io_functions_t cookie_io_functions_t;
struct _IO_cookie_file;
extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write,
void *__cookie, _IO_cookie_io_functions_t __fns);
extern "C" {
extern int __underflow (_IO_FILE *);
extern int __uflow (_IO_FILE *);
extern int __overflow (_IO_FILE *, int);
# 460 "/usr/include/libio.h" 3 4
extern int _IO_getc (_IO_FILE *__fp);
extern int _IO_putc (int __c, _IO_FILE *__fp);
extern int _IO_feof (_IO_FILE *__fp) throw ();
extern int _IO_ferror (_IO_FILE *__fp) throw ();
extern int _IO_peekc_locked (_IO_FILE *__fp);
extern void _IO_flockfile (_IO_FILE *) throw ();
extern void _IO_funlockfile (_IO_FILE *) throw ();
extern int _IO_ftrylockfile (_IO_FILE *) throw ();
# 490 "/usr/include/libio.h" 3 4
extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
__gnuc_va_list, int *__restrict);
extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
__gnuc_va_list);
extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t);
extern size_t _IO_sgetn (_IO_FILE *, void *, size_t);
extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int);
extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int);
extern void _IO_free_backup_area (_IO_FILE *) throw ();
# 552 "/usr/include/libio.h" 3 4
}
# 76 "/usr/include/stdio.h" 2 3 4
typedef __gnuc_va_list va_list;
# 109 "/usr/include/stdio.h" 3 4
typedef _G_fpos_t fpos_t;
typedef _G_fpos64_t fpos64_t;
# 161 "/usr/include/stdio.h" 3 4
# 1 "/usr/include/bits/stdio_lim.h" 1 3 4
# 162 "/usr/include/stdio.h" 2 3 4
extern struct _IO_FILE *stdin;
extern struct _IO_FILE *stdout;
extern struct _IO_FILE *stderr;
extern int remove (__const char *__filename) throw ();
extern int rename (__const char *__old, __const char *__new) throw ();
extern int renameat (int __oldfd, __const char *__old, int __newfd,
__const char *__new) throw ();
extern FILE *tmpfile (void) ;
# 204 "/usr/include/stdio.h" 3 4
extern FILE *tmpfile64 (void) ;
extern char *tmpnam (char *__s) throw () ;
extern char *tmpnam_r (char *__s) throw () ;
# 226 "/usr/include/stdio.h" 3 4
extern char *tempnam (__const char *__dir, __const char *__pfx)
throw () __attribute__ ((__malloc__)) ;
extern int fclose (FILE *__stream);
extern int fflush (FILE *__stream);
# 251 "/usr/include/stdio.h" 3 4
extern int fflush_unlocked (FILE *__stream);
# 261 "/usr/include/stdio.h" 3 4
extern int fcloseall (void);
extern FILE *fopen (__const char *__restrict __filename,
__const char *__restrict __modes) ;
extern FILE *freopen (__const char *__restrict __filename,
__const char *__restrict __modes,
FILE *__restrict __stream) ;
# 294 "/usr/include/stdio.h" 3 4
extern FILE *fopen64 (__const char *__restrict __filename,
__const char *__restrict __modes) ;
extern FILE *freopen64 (__const char *__restrict __filename,
__const char *__restrict __modes,
FILE *__restrict __stream) ;
extern FILE *fdopen (int __fd, __const char *__modes) throw () ;
extern FILE *fopencookie (void *__restrict __magic_cookie,
__const char *__restrict __modes,
_IO_cookie_io_functions_t __io_funcs) throw () ;
extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes)
throw () ;
extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) throw () ;
extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) throw ();
extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
int __modes, size_t __n) throw ();
extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
size_t __size) throw ();
extern void setlinebuf (FILE *__stream) throw ();
extern int fprintf (FILE *__restrict __stream,
__const char *__restrict __format, ...);
extern int printf (__const char *__restrict __format, ...);
extern int sprintf (char *__restrict __s,
__const char *__restrict __format, ...) throw ();
extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
__gnuc_va_list __arg);
extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg);
extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
__gnuc_va_list __arg) throw ();
extern int snprintf (char *__restrict __s, size_t __maxlen,
__const char *__restrict __format, ...)
throw () __attribute__ ((__format__ (__printf__, 3, 4)));
extern int vsnprintf (char *__restrict __s, size_t __maxlen,
__const char *__restrict __format, __gnuc_va_list __arg)
throw () __attribute__ ((__format__ (__printf__, 3, 0)));
extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f,
__gnuc_va_list __arg)
throw () __attribute__ ((__format__ (__printf__, 2, 0))) ;
extern int __asprintf (char **__restrict __ptr,
__const char *__restrict __fmt, ...)
throw () __attribute__ ((__format__ (__printf__, 2, 3))) ;
extern int asprintf (char **__restrict __ptr,
__const char *__restrict __fmt, ...)
throw () __attribute__ ((__format__ (__printf__, 2, 3))) ;
# 416 "/usr/include/stdio.h" 3 4
extern int vdprintf (int __fd, __const char *__restrict __fmt,
__gnuc_va_list __arg)
__attribute__ ((__format__ (__printf__, 2, 0)));
extern int dprintf (int __fd, __const char *__restrict __fmt, ...)
__attribute__ ((__format__ (__printf__, 2, 3)));
extern int fscanf (FILE *__restrict __stream,
__const char *__restrict __format, ...) ;
extern int scanf (__const char *__restrict __format, ...) ;
extern int sscanf (__const char *__restrict __s,
__const char *__restrict __format, ...) throw ();
# 467 "/usr/include/stdio.h" 3 4
extern int vfscanf (FILE *__restrict __s, __const char *__restrict __format,
__gnuc_va_list __arg)
__attribute__ ((__format__ (__scanf__, 2, 0))) ;
extern int vscanf (__const char *__restrict __format, __gnuc_va_list __arg)
__attribute__ ((__format__ (__scanf__, 1, 0))) ;
extern int vsscanf (__const char *__restrict __s,
__const char *__restrict __format, __gnuc_va_list __arg)
throw () __attribute__ ((__format__ (__scanf__, 2, 0)));
# 526 "/usr/include/stdio.h" 3 4
extern int fgetc (FILE *__stream);
extern int getc (FILE *__stream);
extern int getchar (void);
# 554 "/usr/include/stdio.h" 3 4
extern int getc_unlocked (FILE *__stream);
extern int getchar_unlocked (void);
# 565 "/usr/include/stdio.h" 3 4
extern int fgetc_unlocked (FILE *__stream);
extern int fputc (int __c, FILE *__stream);
extern int putc (int __c, FILE *__stream);
extern int putchar (int __c);
# 598 "/usr/include/stdio.h" 3 4
extern int fputc_unlocked (int __c, FILE *__stream);
extern int putc_unlocked (int __c, FILE *__stream);
extern int putchar_unlocked (int __c);
extern int getw (FILE *__stream);
extern int putw (int __w, FILE *__stream);
extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
;
extern char *gets (char *__s) ;
# 644 "/usr/include/stdio.h" 3 4
extern char *fgets_unlocked (char *__restrict __s, int __n,
FILE *__restrict __stream) ;
# 660 "/usr/include/stdio.h" 3 4
extern __ssize_t __getdelim (char **__restrict __lineptr,
size_t *__restrict __n, int __delimiter,
FILE *__restrict __stream) ;
extern __ssize_t getdelim (char **__restrict __lineptr,
size_t *__restrict __n, int __delimiter,
FILE *__restrict __stream) ;
extern __ssize_t getline (char **__restrict __lineptr,
size_t *__restrict __n,
FILE *__restrict __stream) ;
extern int fputs (__const char *__restrict __s, FILE *__restrict __stream);
extern int puts (__const char *__s);
extern int ungetc (int __c, FILE *__stream);
extern size_t fread (void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __stream) ;
extern size_t fwrite (__const void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __s) ;
# 721 "/usr/include/stdio.h" 3 4
extern int fputs_unlocked (__const char *__restrict __s,
FILE *__restrict __stream);
# 732 "/usr/include/stdio.h" 3 4
extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __stream) ;
extern size_t fwrite_unlocked (__const void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __stream) ;
extern int fseek (FILE *__stream, long int __off, int __whence);
extern long int ftell (FILE *__stream) ;
extern void rewind (FILE *__stream);
# 768 "/usr/include/stdio.h" 3 4
extern int fseeko (FILE *__stream, __off_t __off, int __whence);
extern __off_t ftello (FILE *__stream) ;
# 787 "/usr/include/stdio.h" 3 4
extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
extern int fsetpos (FILE *__stream, __const fpos_t *__pos);
# 810 "/usr/include/stdio.h" 3 4
extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence);
extern __off64_t ftello64 (FILE *__stream) ;
extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos);
extern int fsetpos64 (FILE *__stream, __const fpos64_t *__pos);
extern void clearerr (FILE *__stream) throw ();
extern int feof (FILE *__stream) throw () ;
extern int ferror (FILE *__stream) throw () ;
extern void clearerr_unlocked (FILE *__stream) throw ();
extern int feof_unlocked (FILE *__stream) throw () ;
extern int ferror_unlocked (FILE *__stream) throw () ;
extern void perror (__const char *__s);
# 1 "/usr/include/bits/sys_errlist.h" 1 3 4
# 27 "/usr/include/bits/sys_errlist.h" 3 4
extern int sys_nerr;
extern __const char *__const sys_errlist[];
extern int _sys_nerr;
extern __const char *__const _sys_errlist[];
# 849 "/usr/include/stdio.h" 2 3 4
extern int fileno (FILE *__stream) throw () ;
extern int fileno_unlocked (FILE *__stream) throw () ;
# 868 "/usr/include/stdio.h" 3 4
extern FILE *popen (__const char *__command, __const char *__modes) ;
extern int pclose (FILE *__stream);
extern char *ctermid (char *__s) throw ();
extern char *cuserid (char *__s);
struct obstack;
extern int obstack_printf (struct obstack *__restrict __obstack,
__const char *__restrict __format, ...)
throw () __attribute__ ((__format__ (__printf__, 2, 3)));
extern int obstack_vprintf (struct obstack *__restrict __obstack,
__const char *__restrict __format,
__gnuc_va_list __args)
throw () __attribute__ ((__format__ (__printf__, 2, 0)));
extern void flockfile (FILE *__stream) throw ();
extern int ftrylockfile (FILE *__stream) throw () ;
extern void funlockfile (FILE *__stream) throw ();
# 938 "/usr/include/stdio.h" 3 4
}
# 173 "ev.c" 2
# 1 "/usr/include/assert.h" 1 3 4
# 66 "/usr/include/assert.h" 3 4
extern "C" {
extern void __assert_fail (__const char *__assertion, __const char *__file,
unsigned int __line, __const char *__function)
throw () __attribute__ ((__noreturn__));
extern void __assert_perror_fail (int __errnum, __const char *__file,
unsigned int __line,
__const char *__function)
throw () __attribute__ ((__noreturn__));
extern void __assert (const char *__assertion, const char *__file, int __line)
throw () __attribute__ ((__noreturn__));
}
# 175 "ev.c" 2
# 1 "/usr/include/errno.h" 1 3 4
# 32 "/usr/include/errno.h" 3 4
extern "C" {
# 1 "/usr/include/bits/errno.h" 1 3 4
# 25 "/usr/include/bits/errno.h" 3 4
# 1 "/usr/include/linux/errno.h" 1 3 4
# 1 "/usr/include/asm/errno.h" 1 3 4
# 1 "/usr/include/asm-generic/errno.h" 1 3 4
# 1 "/usr/include/asm-generic/errno-base.h" 1 3 4
# 5 "/usr/include/asm-generic/errno.h" 2 3 4
# 1 "/usr/include/asm/errno.h" 2 3 4
# 5 "/usr/include/linux/errno.h" 2 3 4
# 26 "/usr/include/bits/errno.h" 2 3 4
# 47 "/usr/include/bits/errno.h" 3 4
extern int *__errno_location (void) throw () __attribute__ ((__const__));
# 37 "/usr/include/errno.h" 2 3 4
# 55 "/usr/include/errno.h" 3 4
extern char *program_invocation_name, *program_invocation_short_name;
}
# 69 "/usr/include/errno.h" 3 4
typedef int error_t;
# 176 "ev.c" 2
# 1 "/usr/include/time.h" 1 3 4
# 30 "/usr/include/time.h" 3 4
extern "C" {
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include/stddef.h" 1 3 4
# 39 "/usr/include/time.h" 2 3 4
# 1 "/usr/include/bits/time.h" 1 3 4
# 43 "/usr/include/time.h" 2 3 4
# 131 "/usr/include/time.h" 3 4
struct tm
{
int tm_sec;
int tm_min;
int tm_hour;
int tm_mday;
int tm_mon;
int tm_year;
int tm_wday;
int tm_yday;
int tm_isdst;
long int tm_gmtoff;
__const char *tm_zone;
};
struct itimerspec
{
struct timespec it_interval;
struct timespec it_value;
};
struct sigevent;
# 180 "/usr/include/time.h" 3 4
extern clock_t clock (void) throw ();
extern time_t time (time_t *__timer) throw ();
extern double difftime (time_t __time1, time_t __time0)
throw () __attribute__ ((__const__));
extern time_t mktime (struct tm *__tp) throw ();
extern size_t strftime (char *__restrict __s, size_t __maxsize,
__const char *__restrict __format,
__const struct tm *__restrict __tp) throw ();
extern char *strptime (__const char *__restrict __s,
__const char *__restrict __fmt, struct tm *__tp)
throw ();
extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
__const char *__restrict __format,
__const struct tm *__restrict __tp,
__locale_t __loc) throw ();
extern char *strptime_l (__const char *__restrict __s,
__const char *__restrict __fmt, struct tm *__tp,
__locale_t __loc) throw ();
extern struct tm *gmtime (__const time_t *__timer) throw ();
extern struct tm *localtime (__const time_t *__timer) throw ();
extern struct tm *gmtime_r (__const time_t *__restrict __timer,
struct tm *__restrict __tp) throw ();
extern struct tm *localtime_r (__const time_t *__restrict __timer,
struct tm *__restrict __tp) throw ();
extern char *asctime (__const struct tm *__tp) throw ();
extern char *ctime (__const time_t *__timer) throw ();
extern char *asctime_r (__const struct tm *__restrict __tp,
char *__restrict __buf) throw ();
extern char *ctime_r (__const time_t *__restrict __timer,
char *__restrict __buf) throw ();
extern char *__tzname[2];
extern int __daylight;
extern long int __timezone;
extern char *tzname[2];
extern void tzset (void) throw ();
extern int daylight;
extern long int timezone;
extern int stime (__const time_t *__when) throw ();
# 313 "/usr/include/time.h" 3 4
extern time_t timegm (struct tm *__tp) throw ();
extern time_t timelocal (struct tm *__tp) throw ();
extern int dysize (int __year) throw () __attribute__ ((__const__));
# 328 "/usr/include/time.h" 3 4
extern int nanosleep (__const struct timespec *__requested_time,
struct timespec *__remaining);
extern int clock_getres (clockid_t __clock_id, struct timespec *__res) throw ();
extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) throw ();
extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp)
throw ();
extern int clock_nanosleep (clockid_t __clock_id, int __flags,
__const struct timespec *__req,
struct timespec *__rem);
extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) throw ();
extern int timer_create (clockid_t __clock_id,
struct sigevent *__restrict __evp,
timer_t *__restrict __timerid) throw ();
extern int timer_delete (timer_t __timerid) throw ();
extern int timer_settime (timer_t __timerid, int __flags,
__const struct itimerspec *__restrict __value,
struct itimerspec *__restrict __ovalue) throw ();
extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
throw ();
extern int timer_getoverrun (timer_t __timerid) throw ();
# 390 "/usr/include/time.h" 3 4
extern int getdate_err;
# 399 "/usr/include/time.h" 3 4
extern struct tm *getdate (__const char *__string);
# 413 "/usr/include/time.h" 3 4
extern int getdate_r (__const char *__restrict __string,
struct tm *__restrict __resbufp);
}
# 178 "ev.c" 2
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include/limits.h" 1 3 4
# 11 "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include/limits.h" 3 4
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include/syslimits.h" 1 3 4
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include/limits.h" 1 3 4
# 122 "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include/limits.h" 3 4
# 1 "/usr/include/limits.h" 1 3 4
# 145 "/usr/include/limits.h" 3 4
# 1 "/usr/include/bits/posix1_lim.h" 1 3 4
# 157 "/usr/include/bits/posix1_lim.h" 3 4
# 1 "/usr/include/bits/local_lim.h" 1 3 4
# 39 "/usr/include/bits/local_lim.h" 3 4
# 1 "/usr/include/linux/limits.h" 1 3 4
# 40 "/usr/include/bits/local_lim.h" 2 3 4
# 158 "/usr/include/bits/posix1_lim.h" 2 3 4
# 146 "/usr/include/limits.h" 2 3 4
# 1 "/usr/include/bits/posix2_lim.h" 1 3 4
# 150 "/usr/include/limits.h" 2 3 4
# 1 "/usr/include/bits/xopen_lim.h" 1 3 4
# 34 "/usr/include/bits/xopen_lim.h" 3 4
# 1 "/usr/include/bits/stdio_lim.h" 1 3 4
# 35 "/usr/include/bits/xopen_lim.h" 2 3 4
# 154 "/usr/include/limits.h" 2 3 4
# 123 "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include/limits.h" 2 3 4
# 8 "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include/syslimits.h" 2 3 4
# 12 "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include/limits.h" 2 3 4
# 179 "ev.c" 2
# 1 "/usr/include/signal.h" 1 3 4
# 31 "/usr/include/signal.h" 3 4
extern "C" {
# 1 "/usr/include/bits/sigset.h" 1 3 4
# 104 "/usr/include/bits/sigset.h" 3 4
extern int __sigismember (__const __sigset_t *, int);
extern int __sigaddset (__sigset_t *, int);
extern int __sigdelset (__sigset_t *, int);
# 34 "/usr/include/signal.h" 2 3 4
typedef __sig_atomic_t sig_atomic_t;
# 58 "/usr/include/signal.h" 3 4
# 1 "/usr/include/bits/signum.h" 1 3 4
# 59 "/usr/include/signal.h" 2 3 4
# 79 "/usr/include/signal.h" 3 4
# 1 "/usr/include/bits/siginfo.h" 1 3 4
# 25 "/usr/include/bits/siginfo.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 26 "/usr/include/bits/siginfo.h" 2 3 4
typedef union sigval
{
int sival_int;
void *sival_ptr;
} sigval_t;
# 51 "/usr/include/bits/siginfo.h" 3 4
typedef struct siginfo
{
int si_signo;
int si_errno;
int si_code;
union
{
int _pad[((128 / sizeof (int)) - 4)];
struct
{
__pid_t si_pid;
__uid_t si_uid;
} _kill;
struct
{
int si_tid;
int si_overrun;
sigval_t si_sigval;
} _timer;
struct
{
__pid_t si_pid;
__uid_t si_uid;
sigval_t si_sigval;
} _rt;
struct
{
__pid_t si_pid;
__uid_t si_uid;
int si_status;
__clock_t si_utime;
__clock_t si_stime;
} _sigchld;
struct
{
void *si_addr;
} _sigfault;
struct
{
long int si_band;
int si_fd;
} _sigpoll;
} _sifields;
} siginfo_t;
# 129 "/usr/include/bits/siginfo.h" 3 4
enum
{
SI_ASYNCNL = -60,
SI_TKILL = -6,
SI_SIGIO,
SI_ASYNCIO,
SI_MESGQ,
SI_TIMER,
SI_QUEUE,
SI_USER,
SI_KERNEL = 0x80
};
enum
{
ILL_ILLOPC = 1,
ILL_ILLOPN,
ILL_ILLADR,
ILL_ILLTRP,
ILL_PRVOPC,
ILL_PRVREG,
ILL_COPROC,
ILL_BADSTK
};
enum
{
FPE_INTDIV = 1,
FPE_INTOVF,
FPE_FLTDIV,
FPE_FLTOVF,
FPE_FLTUND,
FPE_FLTRES,
FPE_FLTINV,
FPE_FLTSUB
};
enum
{
SEGV_MAPERR = 1,
SEGV_ACCERR
};
enum
{
BUS_ADRALN = 1,
BUS_ADRERR,
BUS_OBJERR
};
enum
{
TRAP_BRKPT = 1,
TRAP_TRACE
};
enum
{
CLD_EXITED = 1,
CLD_KILLED,
CLD_DUMPED,
CLD_TRAPPED,
CLD_STOPPED,
CLD_CONTINUED
};
enum
{
POLL_IN = 1,
POLL_OUT,
POLL_MSG,
POLL_ERR,
POLL_PRI,
POLL_HUP
};
# 273 "/usr/include/bits/siginfo.h" 3 4
typedef struct sigevent
{
sigval_t sigev_value;
int sigev_signo;
int sigev_notify;
union
{
int _pad[((64 / sizeof (int)) - 4)];
__pid_t _tid;
struct
{
void (*_function) (sigval_t);
void *_attribute;
} _sigev_thread;
} _sigev_un;
} sigevent_t;
enum
{
SIGEV_SIGNAL = 0,
SIGEV_NONE,
SIGEV_THREAD,
SIGEV_THREAD_ID = 4
};
# 80 "/usr/include/signal.h" 2 3 4
typedef void (*__sighandler_t) (int);
extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler)
throw ();
extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler)
throw ();
extern __sighandler_t signal (int __sig, __sighandler_t __handler)
throw ();
# 113 "/usr/include/signal.h" 3 4
extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler)
throw ();
extern int kill (__pid_t __pid, int __sig) throw ();
extern int killpg (__pid_t __pgrp, int __sig) throw ();
extern int raise (int __sig) throw ();
extern __sighandler_t ssignal (int __sig, __sighandler_t __handler)
throw ();
extern int gsignal (int __sig) throw ();
extern void psignal (int __sig, __const char *__s);
extern void psiginfo (__const siginfo_t *__pinfo, __const char *__s);
# 168 "/usr/include/signal.h" 3 4
extern int __sigpause (int __sig_or_mask, int __is_sig);
# 177 "/usr/include/signal.h" 3 4
extern int sigpause (int __sig) __asm__ ("__xpg_sigpause");
# 196 "/usr/include/signal.h" 3 4
extern int sigblock (int __mask) throw () __attribute__ ((__deprecated__));
extern int sigsetmask (int __mask) throw () __attribute__ ((__deprecated__));
extern int siggetmask (void) throw () __attribute__ ((__deprecated__));
# 211 "/usr/include/signal.h" 3 4
typedef __sighandler_t sighandler_t;
typedef __sighandler_t sig_t;
extern int sigemptyset (sigset_t *__set) throw () __attribute__ ((__nonnull__ (1)));
extern int sigfillset (sigset_t *__set) throw () __attribute__ ((__nonnull__ (1)));
extern int sigaddset (sigset_t *__set, int __signo) throw () __attribute__ ((__nonnull__ (1)));
extern int sigdelset (sigset_t *__set, int __signo) throw () __attribute__ ((__nonnull__ (1)));
extern int sigismember (__const sigset_t *__set, int __signo)
throw () __attribute__ ((__nonnull__ (1)));
extern int sigisemptyset (__const sigset_t *__set) throw () __attribute__ ((__nonnull__ (1)));
extern int sigandset (sigset_t *__set, __const sigset_t *__left,
__const sigset_t *__right) throw () __attribute__ ((__nonnull__ (1, 2, 3)));
extern int sigorset (sigset_t *__set, __const sigset_t *__left,
__const sigset_t *__right) throw () __attribute__ ((__nonnull__ (1, 2, 3)));
# 1 "/usr/include/bits/sigaction.h" 1 3 4
# 25 "/usr/include/bits/sigaction.h" 3 4
struct sigaction
{
union
{
__sighandler_t sa_handler;
void (*sa_sigaction) (int, siginfo_t *, void *);
}
__sigaction_handler;
__sigset_t sa_mask;
int sa_flags;
void (*sa_restorer) (void);
};
# 253 "/usr/include/signal.h" 2 3 4
extern int sigprocmask (int __how, __const sigset_t *__restrict __set,
sigset_t *__restrict __oset) throw ();
extern int sigsuspend (__const sigset_t *__set) __attribute__ ((__nonnull__ (1)));
extern int sigaction (int __sig, __const struct sigaction *__restrict __act,
struct sigaction *__restrict __oact) throw ();
extern int sigpending (sigset_t *__set) throw () __attribute__ ((__nonnull__ (1)));
extern int sigwait (__const sigset_t *__restrict __set, int *__restrict __sig)
__attribute__ ((__nonnull__ (1, 2)));
extern int sigwaitinfo (__const sigset_t *__restrict __set,
siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1)));
extern int sigtimedwait (__const sigset_t *__restrict __set,
siginfo_t *__restrict __info,
__const struct timespec *__restrict __timeout)
__attribute__ ((__nonnull__ (1)));
extern int sigqueue (__pid_t __pid, int __sig, __const union sigval __val)
throw ();
# 310 "/usr/include/signal.h" 3 4
extern __const char *__const _sys_siglist[65];
extern __const char *__const sys_siglist[65];
struct sigvec
{
__sighandler_t sv_handler;
int sv_mask;
int sv_flags;
};
# 334 "/usr/include/signal.h" 3 4
extern int sigvec (int __sig, __const struct sigvec *__vec,
struct sigvec *__ovec) throw ();
# 1 "/usr/include/bits/sigcontext.h" 1 3 4
# 26 "/usr/include/bits/sigcontext.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 27 "/usr/include/bits/sigcontext.h" 2 3 4
struct _fpreg
{
unsigned short significand[4];
unsigned short exponent;
};
struct _fpxreg
{
unsigned short significand[4];
unsigned short exponent;
unsigned short padding[3];
};
struct _xmmreg
{
__uint32_t element[4];
};
# 109 "/usr/include/bits/sigcontext.h" 3 4
struct _fpstate
{
__uint16_t cwd;
__uint16_t swd;
__uint16_t ftw;
__uint16_t fop;
__uint64_t rip;
__uint64_t rdp;
__uint32_t mxcsr;
__uint32_t mxcr_mask;
struct _fpxreg _st[8];
struct _xmmreg _xmm[16];
__uint32_t padding[24];
};
struct sigcontext
{
unsigned long r8;
unsigned long r9;
unsigned long r10;
unsigned long r11;
unsigned long r12;
unsigned long r13;
unsigned long r14;
unsigned long r15;
unsigned long rdi;
unsigned long rsi;
unsigned long rbp;
unsigned long rbx;
unsigned long rdx;
unsigned long rax;
unsigned long rcx;
unsigned long rsp;
unsigned long rip;
unsigned long eflags;
unsigned short cs;
unsigned short gs;
unsigned short fs;
unsigned short __pad0;
unsigned long err;
unsigned long trapno;
unsigned long oldmask;
unsigned long cr2;
struct _fpstate * fpstate;
unsigned long __reserved1 [8];
};
# 340 "/usr/include/signal.h" 2 3 4
extern int sigreturn (struct sigcontext *__scp) throw ();
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include/stddef.h" 1 3 4
# 350 "/usr/include/signal.h" 2 3 4
extern int siginterrupt (int __sig, int __interrupt) throw ();
# 1 "/usr/include/bits/sigstack.h" 1 3 4
# 26 "/usr/include/bits/sigstack.h" 3 4
struct sigstack
{
void *ss_sp;
int ss_onstack;
};
enum
{
SS_ONSTACK = 1,
SS_DISABLE
};
# 50 "/usr/include/bits/sigstack.h" 3 4
typedef struct sigaltstack
{
void *ss_sp;
int ss_flags;
size_t ss_size;
} stack_t;
# 357 "/usr/include/signal.h" 2 3 4
# 1 "/usr/include/sys/ucontext.h" 1 3 4
# 23 "/usr/include/sys/ucontext.h" 3 4
# 1 "/usr/include/signal.h" 1 3 4
# 24 "/usr/include/sys/ucontext.h" 2 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 25 "/usr/include/sys/ucontext.h" 2 3 4
# 33 "/usr/include/sys/ucontext.h" 3 4
typedef long int greg_t;
typedef greg_t gregset_t[23];
enum
{
REG_R8 = 0,
REG_R9,
REG_R10,
REG_R11,
REG_R12,
REG_R13,
REG_R14,
REG_R15,
REG_RDI,
REG_RSI,
REG_RBP,
REG_RBX,
REG_RDX,
REG_RAX,
REG_RCX,
REG_RSP,
REG_RIP,
REG_EFL,
REG_CSGSFS,
REG_ERR,
REG_TRAPNO,
REG_OLDMASK,
REG_CR2
};
struct _libc_fpxreg
{
unsigned short int significand[4];
unsigned short int exponent;
unsigned short int padding[3];
};
struct _libc_xmmreg
{
__uint32_t element[4];
};
struct _libc_fpstate
{
__uint16_t cwd;
__uint16_t swd;
__uint16_t ftw;
__uint16_t fop;
__uint64_t rip;
__uint64_t rdp;
__uint32_t mxcsr;
__uint32_t mxcr_mask;
struct _libc_fpxreg _st[8];
struct _libc_xmmreg _xmm[16];
__uint32_t padding[24];
};
typedef struct _libc_fpstate *fpregset_t;
typedef struct
{
gregset_t gregs;
fpregset_t fpregs;
unsigned long __reserved1 [8];
} mcontext_t;
typedef struct ucontext
{
unsigned long int uc_flags;
struct ucontext *uc_link;
stack_t uc_stack;
mcontext_t uc_mcontext;
__sigset_t uc_sigmask;
struct _libc_fpstate __fpregs_mem;
} ucontext_t;
# 360 "/usr/include/signal.h" 2 3 4
extern int sigstack (struct sigstack *__ss, struct sigstack *__oss)
throw () __attribute__ ((__deprecated__));
extern int sigaltstack (__const struct sigaltstack *__restrict __ss,
struct sigaltstack *__restrict __oss) throw ();
extern int sighold (int __sig) throw ();
extern int sigrelse (int __sig) throw ();
extern int sigignore (int __sig) throw ();
extern __sighandler_t sigset (int __sig, __sighandler_t __disp) throw ();
# 1 "/usr/include/bits/sigthread.h" 1 3 4
# 31 "/usr/include/bits/sigthread.h" 3 4
extern int pthread_sigmask (int __how,
__const __sigset_t *__restrict __newmask,
__sigset_t *__restrict __oldmask)throw ();
extern int pthread_kill (pthread_t __threadid, int __signo) throw ();
extern int pthread_sigqueue (pthread_t __threadid, int __signo,
const union sigval __value) throw ();
# 396 "/usr/include/signal.h" 2 3 4
extern int __libc_current_sigrtmin (void) throw ();
extern int __libc_current_sigrtmax (void) throw ();
}
# 181 "ev.c" 2
# 1 "ev.h" 1
# 51 "ev.h"
extern "C" {
# 149 "ev.h"
typedef double ev_tstamp;
# 161 "ev.h"
# 1 "/usr/include/sys/stat.h" 1 3 4
# 105 "/usr/include/sys/stat.h" 3 4
extern "C" {
# 1 "/usr/include/bits/stat.h" 1 3 4
# 108 "/usr/include/sys/stat.h" 2 3 4
# 211 "/usr/include/sys/stat.h" 3 4
extern int stat (__const char *__restrict __file,
struct stat *__restrict __buf) throw () __attribute__ ((__nonnull__ (1, 2)));
extern int fstat (int __fd, struct stat *__buf) throw () __attribute__ ((__nonnull__ (2)));
# 230 "/usr/include/sys/stat.h" 3 4
extern int stat64 (__const char *__restrict __file,
struct stat64 *__restrict __buf) throw () __attribute__ ((__nonnull__ (1, 2)));
extern int fstat64 (int __fd, struct stat64 *__buf) throw () __attribute__ ((__nonnull__ (2)));
extern int fstatat (int __fd, __const char *__restrict __file,
struct stat *__restrict __buf, int __flag)
throw () __attribute__ ((__nonnull__ (2, 3)));
# 255 "/usr/include/sys/stat.h" 3 4
extern int fstatat64 (int __fd, __const char *__restrict __file,
struct stat64 *__restrict __buf, int __flag)
throw () __attribute__ ((__nonnull__ (2, 3)));
extern int lstat (__const char *__restrict __file,
struct stat *__restrict __buf) throw () __attribute__ ((__nonnull__ (1, 2)));
# 278 "/usr/include/sys/stat.h" 3 4
extern int lstat64 (__const char *__restrict __file,
struct stat64 *__restrict __buf)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int chmod (__const char *__file, __mode_t __mode)
throw () __attribute__ ((__nonnull__ (1)));
extern int lchmod (__const char *__file, __mode_t __mode)
throw () __attribute__ ((__nonnull__ (1)));
extern int fchmod (int __fd, __mode_t __mode) throw ();
extern int fchmodat (int __fd, __const char *__file, __mode_t __mode,
int __flag)
throw () __attribute__ ((__nonnull__ (2))) ;
extern __mode_t umask (__mode_t __mask) throw ();
extern __mode_t getumask (void) throw ();
extern int mkdir (__const char *__path, __mode_t __mode)
throw () __attribute__ ((__nonnull__ (1)));
extern int mkdirat (int __fd, __const char *__path, __mode_t __mode)
throw () __attribute__ ((__nonnull__ (2)));
extern int mknod (__const char *__path, __mode_t __mode, __dev_t __dev)
throw () __attribute__ ((__nonnull__ (1)));
extern int mknodat (int __fd, __const char *__path, __mode_t __mode,
__dev_t __dev) throw () __attribute__ ((__nonnull__ (2)));
extern int mkfifo (__const char *__path, __mode_t __mode)
throw () __attribute__ ((__nonnull__ (1)));
extern int mkfifoat (int __fd, __const char *__path, __mode_t __mode)
throw () __attribute__ ((__nonnull__ (2)));
extern int utimensat (int __fd, __const char *__path,
__const struct timespec __times[2],
int __flags)
throw () __attribute__ ((__nonnull__ (2)));
extern int futimens (int __fd, __const struct timespec __times[2]) throw ();
# 401 "/usr/include/sys/stat.h" 3 4
extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf)
throw () __attribute__ ((__nonnull__ (3)));
extern int __xstat (int __ver, __const char *__filename,
struct stat *__stat_buf) throw () __attribute__ ((__nonnull__ (2, 3)));
extern int __lxstat (int __ver, __const char *__filename,
struct stat *__stat_buf) throw () __attribute__ ((__nonnull__ (2, 3)));
extern int __fxstatat (int __ver, int __fildes, __const char *__filename,
struct stat *__stat_buf, int __flag)
throw () __attribute__ ((__nonnull__ (3, 4)));
# 434 "/usr/include/sys/stat.h" 3 4
extern int __fxstat64 (int __ver, int __fildes, struct stat64 *__stat_buf)
throw () __attribute__ ((__nonnull__ (3)));
extern int __xstat64 (int __ver, __const char *__filename,
struct stat64 *__stat_buf) throw () __attribute__ ((__nonnull__ (2, 3)));
extern int __lxstat64 (int __ver, __const char *__filename,
struct stat64 *__stat_buf) throw () __attribute__ ((__nonnull__ (2, 3)));
extern int __fxstatat64 (int __ver, int __fildes, __const char *__filename,
struct stat64 *__stat_buf, int __flag)
throw () __attribute__ ((__nonnull__ (3, 4)));
extern int __xmknod (int __ver, __const char *__path, __mode_t __mode,
__dev_t *__dev) throw () __attribute__ ((__nonnull__ (2, 4)));
extern int __xmknodat (int __ver, int __fd, __const char *__path,
__mode_t __mode, __dev_t *__dev)
throw () __attribute__ ((__nonnull__ (3, 5)));
# 536 "/usr/include/sys/stat.h" 3 4
}
# 162 "ev.h" 2
struct ev_loop;
# 211 "ev.h"
enum {
EV_UNDEF = (int)0xFFFFFFFF,
EV_NONE = 0x00,
EV_READ = 0x01,
EV_WRITE = 0x02,
EV__IOFDSET = 0x80,
EV_IO = EV_READ,
EV_TIMER = 0x00000100,
EV_TIMEOUT = EV_TIMER,
EV_PERIODIC = 0x00000200,
EV_SIGNAL = 0x00000400,
EV_CHILD = 0x00000800,
EV_STAT = 0x00001000,
EV_IDLE = 0x00002000,
EV_PREPARE = 0x00004000,
EV_CHECK = 0x00008000,
EV_EMBED = 0x00010000,
EV_FORK = 0x00020000,
EV_CLEANUP = 0x00040000,
EV_ASYNC = 0x00080000,
EV_CUSTOM = 0x01000000,
EV_ERROR = (int)0x80000000
};
# 292 "ev.h"
typedef struct ev_watcher
{
int active; int pending; int priority; void *data; void (*cb)(struct ev_loop *loop, struct ev_watcher *w, int revents);
} ev_watcher;
typedef struct ev_watcher_list
{
int active; int pending; int priority; void *data; void (*cb)(struct ev_loop *loop, struct ev_watcher_list *w, int revents); struct ev_watcher_list *next;
} ev_watcher_list;
typedef struct ev_watcher_time
{
int active; int pending; int priority; void *data; void (*cb)(struct ev_loop *loop, struct ev_watcher_time *w, int revents); ev_tstamp at;
} ev_watcher_time;
typedef struct ev_io
{
int active; int pending; int priority; void *data; void (*cb)(struct ev_loop *loop, struct ev_io *w, int revents); struct ev_watcher_list *next;
int fd;
int events;
} ev_io;
typedef struct ev_timer
{
int active; int pending; int priority; void *data; void (*cb)(struct ev_loop *loop, struct ev_timer *w, int revents); ev_tstamp at;
ev_tstamp repeat;
} ev_timer;
typedef struct ev_periodic
{
int active; int pending; int priority; void *data; void (*cb)(struct ev_loop *loop, struct ev_periodic *w, int revents); ev_tstamp at;
ev_tstamp offset;
ev_tstamp interval;
ev_tstamp (*reschedule_cb)(struct ev_periodic *w, ev_tstamp now) throw();
} ev_periodic;
typedef struct ev_signal
{
int active; int pending; int priority; void *data; void (*cb)(struct ev_loop *loop, struct ev_signal *w, int revents); struct ev_watcher_list *next;
int signum;
} ev_signal;
typedef struct ev_child
{
int active; int pending; int priority; void *data; void (*cb)(struct ev_loop *loop, struct ev_child *w, int revents); struct ev_watcher_list *next;
int flags;
int pid;
int rpid;
int rstatus;
} ev_child;
typedef struct stat ev_statdata;
typedef struct ev_stat
{
int active; int pending; int priority; void *data; void (*cb)(struct ev_loop *loop, struct ev_stat *w, int revents); struct ev_watcher_list *next;
ev_timer timer;
ev_tstamp interval;
const char *path;
ev_statdata prev;
ev_statdata attr;
int wd;
} ev_stat;
typedef struct ev_idle
{
int active; int pending; int priority; void *data; void (*cb)(struct ev_loop *loop, struct ev_idle *w, int revents);
} ev_idle;
typedef struct ev_prepare
{
int active; int pending; int priority; void *data; void (*cb)(struct ev_loop *loop, struct ev_prepare *w, int revents);
} ev_prepare;
typedef struct ev_check
{
int active; int pending; int priority; void *data; void (*cb)(struct ev_loop *loop, struct ev_check *w, int revents);
} ev_check;
typedef struct ev_fork
{
int active; int pending; int priority; void *data; void (*cb)(struct ev_loop *loop, struct ev_fork *w, int revents);
} ev_fork;
typedef struct ev_cleanup
{
int active; int pending; int priority; void *data; void (*cb)(struct ev_loop *loop, struct ev_cleanup *w, int revents);
} ev_cleanup;
typedef struct ev_embed
{
int active; int pending; int priority; void *data; void (*cb)(struct ev_loop *loop, struct ev_embed *w, int revents);
struct ev_loop *other;
ev_io io;
ev_prepare prepare;
ev_check check;
ev_timer timer;
ev_periodic periodic;
ev_idle idle;
ev_fork fork;
ev_cleanup cleanup;
} ev_embed;
typedef struct ev_async
{
int active; int pending; int priority; void *data; void (*cb)(struct ev_loop *loop, struct ev_async *w, int revents);
sig_atomic_t volatile sent;
} ev_async;
union ev_any_watcher
{
struct ev_watcher w;
struct ev_watcher_list wl;
struct ev_io io;
struct ev_timer timer;
struct ev_periodic periodic;
struct ev_signal signal;
struct ev_child child;
struct ev_stat stat;
struct ev_idle idle;
struct ev_prepare prepare;
struct ev_check check;
struct ev_fork fork;
struct ev_cleanup cleanup;
struct ev_embed embed;
struct ev_async async;
};
enum {
EVFLAG_AUTO = 0x00000000U,
EVFLAG_NOENV = 0x01000000U,
EVFLAG_FORKCHECK = 0x02000000U,
EVFLAG_NOINOTIFY = 0x00100000U,
EVFLAG_NOSIGFD = 0,
EVFLAG_SIGNALFD = 0x00200000U,
EVFLAG_NOSIGMASK = 0x00400000U
};
enum {
EVBACKEND_SELECT = 0x00000001U,
EVBACKEND_POLL = 0x00000002U,
EVBACKEND_EPOLL = 0x00000004U,
EVBACKEND_KQUEUE = 0x00000008U,
EVBACKEND_DEVPOLL = 0x00000010U,
EVBACKEND_PORT = 0x00000020U,
EVBACKEND_ALL = 0x0000003FU,
EVBACKEND_MASK = 0x0000FFFFU
};
extern int ev_version_major (void) throw();
extern int ev_version_minor (void) throw();
extern unsigned int ev_supported_backends (void) throw();
extern unsigned int ev_recommended_backends (void) throw();
extern unsigned int ev_embeddable_backends (void) throw();
extern ev_tstamp ev_time (void) throw();
extern void ev_sleep (ev_tstamp delay) throw();
extern void ev_set_allocator (void *(*cb)(void *ptr, long size) throw()) throw();
extern void ev_set_syserr_cb (void (*cb)(const char *msg) throw()) throw();
extern struct ev_loop *ev_default_loop (unsigned int flags = 0) throw();
static inline struct ev_loop *
ev_default_loop_uc_ (void) throw()
{
extern struct ev_loop *ev_default_loop_ptr;
return ev_default_loop_ptr;
}
static inline int
ev_is_default_loop (struct ev_loop *loop) throw()
{
return loop == ev_default_loop_uc_ ();
}
extern struct ev_loop *ev_loop_new (unsigned int flags = 0) throw();
extern ev_tstamp ev_now (struct ev_loop *loop) throw();
# 598 "ev.h"
extern void ev_loop_destroy (struct ev_loop *loop);
extern void ev_loop_fork (struct ev_loop *loop) throw();
extern unsigned int ev_backend (struct ev_loop *loop) throw();
extern void ev_now_update (struct ev_loop *loop) throw();
# 620 "ev.h"
enum {
EVRUN_NOWAIT = 1,
EVRUN_ONCE = 2
};
enum {
EVBREAK_CANCEL = 0,
EVBREAK_ONE = 1,
EVBREAK_ALL = 2
};
extern int ev_run (struct ev_loop *loop, int flags = 0);
extern void ev_break (struct ev_loop *loop, int how = EVBREAK_ONE) throw();
extern void ev_ref (struct ev_loop *loop) throw();
extern void ev_unref (struct ev_loop *loop) throw();
extern void ev_once (struct ev_loop *loop, int fd, int events, ev_tstamp timeout, void (*cb)(int revents, void *arg), void *arg) throw();
extern unsigned int ev_iteration (struct ev_loop *loop) throw();
extern unsigned int ev_depth (struct ev_loop *loop) throw();
extern void ev_verify (struct ev_loop *loop) throw();
extern void ev_set_io_collect_interval (struct ev_loop *loop, ev_tstamp interval) throw();
extern void ev_set_timeout_collect_interval (struct ev_loop *loop, ev_tstamp interval) throw();
extern void ev_set_userdata (struct ev_loop *loop, void *data) throw();
extern void *ev_userdata (struct ev_loop *loop) throw();
extern void ev_set_invoke_pending_cb (struct ev_loop *loop, void (*invoke_pending_cb)(struct ev_loop *loop)) throw();
extern void ev_set_loop_release_cb (struct ev_loop *loop, void (*release)(struct ev_loop *loop), void (*acquire)(struct ev_loop *loop) throw()) throw();
extern unsigned int ev_pending_count (struct ev_loop *loop) throw();
extern void ev_invoke_pending (struct ev_loop *loop);
extern void ev_suspend (struct ev_loop *loop) throw();
extern void ev_resume (struct ev_loop *loop) throw();
# 738 "ev.h"
extern void ev_feed_event (struct ev_loop *loop, void *w, int revents) throw();
extern void ev_feed_fd_event (struct ev_loop *loop, int fd, int revents) throw();
extern void ev_feed_signal (int signum) throw();
extern void ev_feed_signal_event (struct ev_loop *loop, int signum) throw();
extern void ev_invoke (struct ev_loop *loop, void *w, int revents);
extern int ev_clear_pending (struct ev_loop *loop, void *w) throw();
extern void ev_io_start (struct ev_loop *loop, ev_io *w) throw();
extern void ev_io_stop (struct ev_loop *loop, ev_io *w) throw();
extern void ev_timer_start (struct ev_loop *loop, ev_timer *w) throw();
extern void ev_timer_stop (struct ev_loop *loop, ev_timer *w) throw();
extern void ev_timer_again (struct ev_loop *loop, ev_timer *w) throw();
extern ev_tstamp ev_timer_remaining (struct ev_loop *loop, ev_timer *w) throw();
extern void ev_periodic_start (struct ev_loop *loop, ev_periodic *w) throw();
extern void ev_periodic_stop (struct ev_loop *loop, ev_periodic *w) throw();
extern void ev_periodic_again (struct ev_loop *loop, ev_periodic *w) throw();
extern void ev_signal_start (struct ev_loop *loop, ev_signal *w) throw();
extern void ev_signal_stop (struct ev_loop *loop, ev_signal *w) throw();
extern void ev_child_start (struct ev_loop *loop, ev_child *w) throw();
extern void ev_child_stop (struct ev_loop *loop, ev_child *w) throw();
extern void ev_stat_start (struct ev_loop *loop, ev_stat *w) throw();
extern void ev_stat_stop (struct ev_loop *loop, ev_stat *w) throw();
extern void ev_stat_stat (struct ev_loop *loop, ev_stat *w) throw();
extern void ev_idle_start (struct ev_loop *loop, ev_idle *w) throw();
extern void ev_idle_stop (struct ev_loop *loop, ev_idle *w) throw();
extern void ev_prepare_start (struct ev_loop *loop, ev_prepare *w) throw();
extern void ev_prepare_stop (struct ev_loop *loop, ev_prepare *w) throw();
extern void ev_check_start (struct ev_loop *loop, ev_check *w) throw();
extern void ev_check_stop (struct ev_loop *loop, ev_check *w) throw();
extern void ev_fork_start (struct ev_loop *loop, ev_fork *w) throw();
extern void ev_fork_stop (struct ev_loop *loop, ev_fork *w) throw();
extern void ev_cleanup_start (struct ev_loop *loop, ev_cleanup *w) throw();
extern void ev_cleanup_stop (struct ev_loop *loop, ev_cleanup *w) throw();
extern void ev_embed_start (struct ev_loop *loop, ev_embed *w) throw();
extern void ev_embed_stop (struct ev_loop *loop, ev_embed *w) throw();
extern void ev_embed_sweep (struct ev_loop *loop, ev_embed *w) throw();
extern void ev_async_start (struct ev_loop *loop, ev_async *w) throw();
extern void ev_async_stop (struct ev_loop *loop, ev_async *w) throw();
extern void ev_async_send (struct ev_loop *loop, ev_async *w) throw();
# 826 "ev.h"
static inline void ev_loop (struct ev_loop *loop, int flags) { ev_run (loop, flags); }
static inline void ev_unloop (struct ev_loop *loop, int how ) { ev_break (loop, how ); }
static inline void ev_default_destroy (void) { ev_loop_destroy (ev_default_loop (0)); }
static inline void ev_default_fork (void) { ev_loop_fork (ev_default_loop (0)); }
static inline unsigned int ev_loop_count (struct ev_loop *loop) { return ev_iteration (loop); }
static inline unsigned int ev_loop_depth (struct ev_loop *loop) { return ev_depth (loop); }
static inline void ev_loop_verify (struct ev_loop *loop) { ev_verify (loop); }
# 842 "ev.h"
}
# 186 "ev.c" 2
# 200 "ev.c"
# 1 "/usr/include/sys/time.h" 1 3 4
# 29 "/usr/include/sys/time.h" 3 4
# 1 "/usr/include/bits/time.h" 1 3 4
# 30 "/usr/include/sys/time.h" 2 3 4
# 39 "/usr/include/sys/time.h" 3 4
extern "C" {
# 57 "/usr/include/sys/time.h" 3 4
struct timezone
{
int tz_minuteswest;
int tz_dsttime;
};
typedef struct timezone *__restrict __timezone_ptr_t;
# 73 "/usr/include/sys/time.h" 3 4
extern int gettimeofday (struct timeval *__restrict __tv,
__timezone_ptr_t __tz) throw () __attribute__ ((__nonnull__ (1)));
extern int settimeofday (__const struct timeval *__tv,
__const struct timezone *__tz)
throw () __attribute__ ((__nonnull__ (1)));
extern int adjtime (__const struct timeval *__delta,
struct timeval *__olddelta) throw ();
enum __itimer_which
{
ITIMER_REAL = 0,
ITIMER_VIRTUAL = 1,
ITIMER_PROF = 2
};
struct itimerval
{
struct timeval it_interval;
struct timeval it_value;
};
typedef int __itimer_which_t;
extern int getitimer (__itimer_which_t __which,
struct itimerval *__value) throw ();
extern int setitimer (__itimer_which_t __which,
__const struct itimerval *__restrict __new,
struct itimerval *__restrict __old) throw ();
extern int utimes (__const char *__file, __const struct timeval __tvp[2])
throw () __attribute__ ((__nonnull__ (1)));
extern int lutimes (__const char *__file, __const struct timeval __tvp[2])
throw () __attribute__ ((__nonnull__ (1)));
extern int futimes (int __fd, __const struct timeval __tvp[2]) throw ();
extern int futimesat (int __fd, __const char *__file,
__const struct timeval __tvp[2]) throw ();
# 191 "/usr/include/sys/time.h" 3 4
}
# 201 "ev.c" 2
# 1 "/usr/include/sys/wait.h" 1 3 4
# 29 "/usr/include/sys/wait.h" 3 4
extern "C" {
# 1 "/usr/include/sys/resource.h" 1 3 4
# 25 "/usr/include/sys/resource.h" 3 4
# 1 "/usr/include/bits/resource.h" 1 3 4
# 33 "/usr/include/bits/resource.h" 3 4
enum __rlimit_resource
{
RLIMIT_CPU = 0,
RLIMIT_FSIZE = 1,
RLIMIT_DATA = 2,
RLIMIT_STACK = 3,
RLIMIT_CORE = 4,
__RLIMIT_RSS = 5,
RLIMIT_NOFILE = 7,
__RLIMIT_OFILE = RLIMIT_NOFILE,
RLIMIT_AS = 9,
__RLIMIT_NPROC = 6,
__RLIMIT_MEMLOCK = 8,
__RLIMIT_LOCKS = 10,
__RLIMIT_SIGPENDING = 11,
__RLIMIT_MSGQUEUE = 12,
__RLIMIT_NICE = 13,
__RLIMIT_RTPRIO = 14,
__RLIMIT_NLIMITS = 15,
__RLIM_NLIMITS = __RLIMIT_NLIMITS
};
# 127 "/usr/include/bits/resource.h" 3 4
typedef __rlim_t rlim_t;
typedef __rlim64_t rlim64_t;
struct rlimit
{
rlim_t rlim_cur;
rlim_t rlim_max;
};
struct rlimit64
{
rlim64_t rlim_cur;
rlim64_t rlim_max;
};
enum __rusage_who
{
RUSAGE_SELF = 0,
RUSAGE_CHILDREN = -1
,
RUSAGE_THREAD = 1
};
# 1 "/usr/include/bits/time.h" 1 3 4
# 176 "/usr/include/bits/resource.h" 2 3 4
struct rusage
{
struct timeval ru_utime;
struct timeval ru_stime;
long int ru_maxrss;
long int ru_ixrss;
long int ru_idrss;
long int ru_isrss;
long int ru_minflt;
long int ru_majflt;
long int ru_nswap;
long int ru_inblock;
long int ru_oublock;
long int ru_msgsnd;
long int ru_msgrcv;
long int ru_nsignals;
long int ru_nvcsw;
long int ru_nivcsw;
};
enum __priority_which
{
PRIO_PROCESS = 0,
PRIO_PGRP = 1,
PRIO_USER = 2
};
# 26 "/usr/include/sys/resource.h" 2 3 4
extern "C" {
# 43 "/usr/include/sys/resource.h" 3 4
typedef int __rlimit_resource_t;
typedef int __rusage_who_t;
typedef int __priority_which_t;
extern int getrlimit (__rlimit_resource_t __resource,
struct rlimit *__rlimits) throw ();
# 62 "/usr/include/sys/resource.h" 3 4
extern int getrlimit64 (__rlimit_resource_t __resource,
struct rlimit64 *__rlimits) throw ();
extern int setrlimit (__rlimit_resource_t __resource,
__const struct rlimit *__rlimits) throw ();
# 82 "/usr/include/sys/resource.h" 3 4
extern int setrlimit64 (__rlimit_resource_t __resource,
__const struct rlimit64 *__rlimits) throw ();
extern int getrusage (__rusage_who_t __who, struct rusage *__usage) throw ();
extern int getpriority (__priority_which_t __which, id_t __who) throw ();
extern int setpriority (__priority_which_t __which, id_t __who, int __prio)
throw ();
}
# 33 "/usr/include/sys/wait.h" 2 3 4
# 102 "/usr/include/sys/wait.h" 3 4
typedef enum
{
P_ALL,
P_PID,
P_PGID
} idtype_t;
# 116 "/usr/include/sys/wait.h" 3 4
extern __pid_t wait (void * __stat_loc);
# 139 "/usr/include/sys/wait.h" 3 4
extern __pid_t waitpid (__pid_t __pid, int *__stat_loc, int __options);
# 1 "/usr/include/bits/siginfo.h" 1 3 4
# 25 "/usr/include/bits/siginfo.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 26 "/usr/include/bits/siginfo.h" 2 3 4
# 144 "/usr/include/sys/wait.h" 2 3 4
# 155 "/usr/include/sys/wait.h" 3 4
extern int waitid (idtype_t __idtype, __id_t __id, siginfo_t *__infop,
int __options);
struct rusage;
extern __pid_t wait3 (void * __stat_loc, int __options,
struct rusage * __usage) throw ();
extern __pid_t wait4 (__pid_t __pid, void * __stat_loc, int __options,
struct rusage *__usage) throw ();
}
# 202 "ev.c" 2
# 1 "/usr/include/unistd.h" 1 3 4
# 28 "/usr/include/unistd.h" 3 4
extern "C" {
# 203 "/usr/include/unistd.h" 3 4
# 1 "/usr/include/bits/posix_opt.h" 1 3 4
# 204 "/usr/include/unistd.h" 2 3 4
# 1 "/usr/include/bits/environments.h" 1 3 4
# 23 "/usr/include/bits/environments.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 24 "/usr/include/bits/environments.h" 2 3 4
# 208 "/usr/include/unistd.h" 2 3 4
# 227 "/usr/include/unistd.h" 3 4
# 1 "/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include/stddef.h" 1 3 4
# 228 "/usr/include/unistd.h" 2 3 4
# 268 "/usr/include/unistd.h" 3 4
typedef __intptr_t intptr_t;
typedef __socklen_t socklen_t;
# 288 "/usr/include/unistd.h" 3 4
extern int access (__const char *__name, int __type) throw () __attribute__ ((__nonnull__ (1)));
extern int euidaccess (__const char *__name, int __type)
throw () __attribute__ ((__nonnull__ (1)));
extern int eaccess (__const char *__name, int __type)
throw () __attribute__ ((__nonnull__ (1)));
extern int faccessat (int __fd, __const char *__file, int __type, int __flag)
throw () __attribute__ ((__nonnull__ (2))) ;
# 331 "/usr/include/unistd.h" 3 4
extern __off_t lseek (int __fd, __off_t __offset, int __whence) throw ();
# 342 "/usr/include/unistd.h" 3 4
extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence)
throw ();
extern int close (int __fd);
extern ssize_t read (int __fd, void *__buf, size_t __nbytes) ;
extern ssize_t write (int __fd, __const void *__buf, size_t __n) ;
# 373 "/usr/include/unistd.h" 3 4
extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,
__off_t __offset) ;
extern ssize_t pwrite (int __fd, __const void *__buf, size_t __n,
__off_t __offset) ;
# 401 "/usr/include/unistd.h" 3 4
extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes,
__off64_t __offset) ;
extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n,
__off64_t __offset) ;
extern int pipe (int __pipedes[2]) throw () ;
extern int pipe2 (int __pipedes[2], int __flags) throw () ;
# 429 "/usr/include/unistd.h" 3 4
extern unsigned int alarm (unsigned int __seconds) throw ();
# 441 "/usr/include/unistd.h" 3 4
extern unsigned int sleep (unsigned int __seconds);
extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval)
throw ();
extern int usleep (__useconds_t __useconds);
# 466 "/usr/include/unistd.h" 3 4
extern int pause (void);
extern int chown (__const char *__file, __uid_t __owner, __gid_t __group)
throw () __attribute__ ((__nonnull__ (1))) ;
extern int fchown (int __fd, __uid_t __owner, __gid_t __group) throw () ;
extern int lchown (__const char *__file, __uid_t __owner, __gid_t __group)
throw () __attribute__ ((__nonnull__ (1))) ;
extern int fchownat (int __fd, __const char *__file, __uid_t __owner,
__gid_t __group, int __flag)
throw () __attribute__ ((__nonnull__ (2))) ;
extern int chdir (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) ;
extern int fchdir (int __fd) throw () ;
# 508 "/usr/include/unistd.h" 3 4
extern char *getcwd (char *__buf, size_t __size) throw () ;
extern char *get_current_dir_name (void) throw ();
extern char *getwd (char *__buf)
throw () __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) ;
extern int dup (int __fd) throw () ;
extern int dup2 (int __fd, int __fd2) throw ();
extern int dup3 (int __fd, int __fd2, int __flags) throw ();
extern char **__environ;
extern char **environ;
extern int execve (__const char *__path, char *__const __argv[],
char *__const __envp[]) throw () __attribute__ ((__nonnull__ (1, 2)));
extern int fexecve (int __fd, char *__const __argv[], char *__const __envp[])
throw () __attribute__ ((__nonnull__ (2)));
extern int execv (__const char *__path, char *__const __argv[])
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int execle (__const char *__path, __const char *__arg, ...)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int execl (__const char *__path, __const char *__arg, ...)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int execvp (__const char *__file, char *__const __argv[])
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int execlp (__const char *__file, __const char *__arg, ...)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int execvpe (__const char *__file, char *__const __argv[],
char *__const __envp[])
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int nice (int __inc) throw () ;
extern void _exit (int __status) __attribute__ ((__noreturn__));
# 1 "/usr/include/bits/confname.h" 1 3 4
# 26 "/usr/include/bits/confname.h" 3 4
enum
{
_PC_LINK_MAX,
_PC_MAX_CANON,
_PC_MAX_INPUT,
_PC_NAME_MAX,
_PC_PATH_MAX,
_PC_PIPE_BUF,
_PC_CHOWN_RESTRICTED,
_PC_NO_TRUNC,
_PC_VDISABLE,
_PC_SYNC_IO,
_PC_ASYNC_IO,
_PC_PRIO_IO,
_PC_SOCK_MAXBUF,
_PC_FILESIZEBITS,
_PC_REC_INCR_XFER_SIZE,
_PC_REC_MAX_XFER_SIZE,
_PC_REC_MIN_XFER_SIZE,
_PC_REC_XFER_ALIGN,
_PC_ALLOC_SIZE_MIN,
_PC_SYMLINK_MAX,
_PC_2_SYMLINKS
};
enum
{
_SC_ARG_MAX,
_SC_CHILD_MAX,
_SC_CLK_TCK,
_SC_NGROUPS_MAX,
_SC_OPEN_MAX,
_SC_STREAM_MAX,
_SC_TZNAME_MAX,
_SC_JOB_CONTROL,
_SC_SAVED_IDS,
_SC_REALTIME_SIGNALS,
_SC_PRIORITY_SCHEDULING,
_SC_TIMERS,
_SC_ASYNCHRONOUS_IO,
_SC_PRIORITIZED_IO,
_SC_SYNCHRONIZED_IO,
_SC_FSYNC,
_SC_MAPPED_FILES,
_SC_MEMLOCK,
_SC_MEMLOCK_RANGE,
_SC_MEMORY_PROTECTION,
_SC_MESSAGE_PASSING,
_SC_SEMAPHORES,
_SC_SHARED_MEMORY_OBJECTS,
_SC_AIO_LISTIO_MAX,
_SC_AIO_MAX,
_SC_AIO_PRIO_DELTA_MAX,
_SC_DELAYTIMER_MAX,
_SC_MQ_OPEN_MAX,
_SC_MQ_PRIO_MAX,
_SC_VERSION,
_SC_PAGESIZE,
_SC_RTSIG_MAX,
_SC_SEM_NSEMS_MAX,
_SC_SEM_VALUE_MAX,
_SC_SIGQUEUE_MAX,
_SC_TIMER_MAX,
_SC_BC_BASE_MAX,
_SC_BC_DIM_MAX,
_SC_BC_SCALE_MAX,
_SC_BC_STRING_MAX,
_SC_COLL_WEIGHTS_MAX,
_SC_EQUIV_CLASS_MAX,
_SC_EXPR_NEST_MAX,
_SC_LINE_MAX,
_SC_RE_DUP_MAX,
_SC_CHARCLASS_NAME_MAX,
_SC_2_VERSION,
_SC_2_C_BIND,
_SC_2_C_DEV,
_SC_2_FORT_DEV,
_SC_2_FORT_RUN,
_SC_2_SW_DEV,
_SC_2_LOCALEDEF,
_SC_PII,
_SC_PII_XTI,
_SC_PII_SOCKET,
_SC_PII_INTERNET,
_SC_PII_OSI,
_SC_POLL,
_SC_SELECT,
_SC_UIO_MAXIOV,
_SC_IOV_MAX = _SC_UIO_MAXIOV,
_SC_PII_INTERNET_STREAM,
_SC_PII_INTERNET_DGRAM,
_SC_PII_OSI_COTS,
_SC_PII_OSI_CLTS,
_SC_PII_OSI_M,
_SC_T_IOV_MAX,
_SC_THREADS,
_SC_THREAD_SAFE_FUNCTIONS,
_SC_GETGR_R_SIZE_MAX,
_SC_GETPW_R_SIZE_MAX,
_SC_LOGIN_NAME_MAX,
_SC_TTY_NAME_MAX,
_SC_THREAD_DESTRUCTOR_ITERATIONS,
_SC_THREAD_KEYS_MAX,
_SC_THREAD_STACK_MIN,
_SC_THREAD_THREADS_MAX,
_SC_THREAD_ATTR_STACKADDR,
_SC_THREAD_ATTR_STACKSIZE,
_SC_THREAD_PRIORITY_SCHEDULING,
_SC_THREAD_PRIO_INHERIT,
_SC_THREAD_PRIO_PROTECT,
_SC_THREAD_PROCESS_SHARED,
_SC_NPROCESSORS_CONF,
_SC_NPROCESSORS_ONLN,
_SC_PHYS_PAGES,
_SC_AVPHYS_PAGES,
_SC_ATEXIT_MAX,
_SC_PASS_MAX,
_SC_XOPEN_VERSION,
_SC_XOPEN_XCU_VERSION,
_SC_XOPEN_UNIX,
_SC_XOPEN_CRYPT,
_SC_XOPEN_ENH_I18N,
_SC_XOPEN_SHM,
_SC_2_CHAR_TERM,
_SC_2_C_VERSION,
_SC_2_UPE,
_SC_XOPEN_XPG2,
_SC_XOPEN_XPG3,
_SC_XOPEN_XPG4,
_SC_CHAR_BIT,
_SC_CHAR_MAX,
_SC_CHAR_MIN,
_SC_INT_MAX,
_SC_INT_MIN,
_SC_LONG_BIT,
_SC_WORD_BIT,
_SC_MB_LEN_MAX,
_SC_NZERO,
_SC_SSIZE_MAX,
_SC_SCHAR_MAX,
_SC_SCHAR_MIN,
_SC_SHRT_MAX,
_SC_SHRT_MIN,
_SC_UCHAR_MAX,
_SC_UINT_MAX,
_SC_ULONG_MAX,
_SC_USHRT_MAX,
_SC_NL_ARGMAX,
_SC_NL_LANGMAX,
_SC_NL_MSGMAX,
_SC_NL_NMAX,
_SC_NL_SETMAX,
_SC_NL_TEXTMAX,
_SC_XBS5_ILP32_OFF32,
_SC_XBS5_ILP32_OFFBIG,
_SC_XBS5_LP64_OFF64,
_SC_XBS5_LPBIG_OFFBIG,
_SC_XOPEN_LEGACY,
_SC_XOPEN_REALTIME,
_SC_XOPEN_REALTIME_THREADS,
_SC_ADVISORY_INFO,
_SC_BARRIERS,
_SC_BASE,
_SC_C_LANG_SUPPORT,
_SC_C_LANG_SUPPORT_R,
_SC_CLOCK_SELECTION,
_SC_CPUTIME,
_SC_THREAD_CPUTIME,
_SC_DEVICE_IO,
_SC_DEVICE_SPECIFIC,
_SC_DEVICE_SPECIFIC_R,
_SC_FD_MGMT,
_SC_FIFO,
_SC_PIPE,
_SC_FILE_ATTRIBUTES,
_SC_FILE_LOCKING,
_SC_FILE_SYSTEM,
_SC_MONOTONIC_CLOCK,
_SC_MULTI_PROCESS,
_SC_SINGLE_PROCESS,
_SC_NETWORKING,
_SC_READER_WRITER_LOCKS,
_SC_SPIN_LOCKS,
_SC_REGEXP,
_SC_REGEX_VERSION,
_SC_SHELL,
_SC_SIGNALS,
_SC_SPAWN,
_SC_SPORADIC_SERVER,
_SC_THREAD_SPORADIC_SERVER,
_SC_SYSTEM_DATABASE,
_SC_SYSTEM_DATABASE_R,
_SC_TIMEOUTS,
_SC_TYPED_MEMORY_OBJECTS,
_SC_USER_GROUPS,
_SC_USER_GROUPS_R,
_SC_2_PBS,
_SC_2_PBS_ACCOUNTING,
_SC_2_PBS_LOCATE,
_SC_2_PBS_MESSAGE,
_SC_2_PBS_TRACK,
_SC_SYMLOOP_MAX,
_SC_STREAMS,
_SC_2_PBS_CHECKPOINT,
_SC_V6_ILP32_OFF32,
_SC_V6_ILP32_OFFBIG,
_SC_V6_LP64_OFF64,
_SC_V6_LPBIG_OFFBIG,
_SC_HOST_NAME_MAX,
_SC_TRACE,
_SC_TRACE_EVENT_FILTER,
_SC_TRACE_INHERIT,
_SC_TRACE_LOG,
_SC_LEVEL1_ICACHE_SIZE,
_SC_LEVEL1_ICACHE_ASSOC,
_SC_LEVEL1_ICACHE_LINESIZE,
_SC_LEVEL1_DCACHE_SIZE,
_SC_LEVEL1_DCACHE_ASSOC,
_SC_LEVEL1_DCACHE_LINESIZE,
_SC_LEVEL2_CACHE_SIZE,
_SC_LEVEL2_CACHE_ASSOC,
_SC_LEVEL2_CACHE_LINESIZE,
_SC_LEVEL3_CACHE_SIZE,
_SC_LEVEL3_CACHE_ASSOC,
_SC_LEVEL3_CACHE_LINESIZE,
_SC_LEVEL4_CACHE_SIZE,
_SC_LEVEL4_CACHE_ASSOC,
_SC_LEVEL4_CACHE_LINESIZE,
_SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50,
_SC_RAW_SOCKETS,
_SC_V7_ILP32_OFF32,
_SC_V7_ILP32_OFFBIG,
_SC_V7_LP64_OFF64,
_SC_V7_LPBIG_OFFBIG,
_SC_SS_REPL_MAX,
_SC_TRACE_EVENT_NAME_MAX,
_SC_TRACE_NAME_MAX,
_SC_TRACE_SYS_MAX,
_SC_TRACE_USER_EVENT_MAX,
_SC_XOPEN_STREAMS,
_SC_THREAD_ROBUST_PRIO_INHERIT,
_SC_THREAD_ROBUST_PRIO_PROTECT
};
enum
{
_CS_PATH,
_CS_V6_WIDTH_RESTRICTED_ENVS,
_CS_GNU_LIBC_VERSION,
_CS_GNU_LIBPTHREAD_VERSION,
_CS_V5_WIDTH_RESTRICTED_ENVS,
_CS_V7_WIDTH_RESTRICTED_ENVS,
_CS_LFS_CFLAGS = 1000,
_CS_LFS_LDFLAGS,
_CS_LFS_LIBS,
_CS_LFS_LINTFLAGS,
_CS_LFS64_CFLAGS,
_CS_LFS64_LDFLAGS,
_CS_LFS64_LIBS,
_CS_LFS64_LINTFLAGS,
_CS_XBS5_ILP32_OFF32_CFLAGS = 1100,
_CS_XBS5_ILP32_OFF32_LDFLAGS,
_CS_XBS5_ILP32_OFF32_LIBS,
_CS_XBS5_ILP32_OFF32_LINTFLAGS,
_CS_XBS5_ILP32_OFFBIG_CFLAGS,
_CS_XBS5_ILP32_OFFBIG_LDFLAGS,
_CS_XBS5_ILP32_OFFBIG_LIBS,
_CS_XBS5_ILP32_OFFBIG_LINTFLAGS,
_CS_XBS5_LP64_OFF64_CFLAGS,
_CS_XBS5_LP64_OFF64_LDFLAGS,
_CS_XBS5_LP64_OFF64_LIBS,
_CS_XBS5_LP64_OFF64_LINTFLAGS,
_CS_XBS5_LPBIG_OFFBIG_CFLAGS,
_CS_XBS5_LPBIG_OFFBIG_LDFLAGS,
_CS_XBS5_LPBIG_OFFBIG_LIBS,
_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS,
_CS_POSIX_V6_ILP32_OFF32_CFLAGS,
_CS_POSIX_V6_ILP32_OFF32_LDFLAGS,
_CS_POSIX_V6_ILP32_OFF32_LIBS,
_CS_POSIX_V6_ILP32_OFF32_LINTFLAGS,
_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS,
_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS,
_CS_POSIX_V6_ILP32_OFFBIG_LIBS,
_CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS,
_CS_POSIX_V6_LP64_OFF64_CFLAGS,
_CS_POSIX_V6_LP64_OFF64_LDFLAGS,
_CS_POSIX_V6_LP64_OFF64_LIBS,
_CS_POSIX_V6_LP64_OFF64_LINTFLAGS,
_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS,
_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS,
_CS_POSIX_V6_LPBIG_OFFBIG_LIBS,
_CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS,
_CS_POSIX_V7_ILP32_OFF32_CFLAGS,
_CS_POSIX_V7_ILP32_OFF32_LDFLAGS,
_CS_POSIX_V7_ILP32_OFF32_LIBS,
_CS_POSIX_V7_ILP32_OFF32_LINTFLAGS,
_CS_POSIX_V7_ILP32_OFFBIG_CFLAGS,
_CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS,
_CS_POSIX_V7_ILP32_OFFBIG_LIBS,
_CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS,
_CS_POSIX_V7_LP64_OFF64_CFLAGS,
_CS_POSIX_V7_LP64_OFF64_LDFLAGS,
_CS_POSIX_V7_LP64_OFF64_LIBS,
_CS_POSIX_V7_LP64_OFF64_LINTFLAGS,
_CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS,
_CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS,
_CS_POSIX_V7_LPBIG_OFFBIG_LIBS,
_CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS,
_CS_V6_ENV,
_CS_V7_ENV
};
# 607 "/usr/include/unistd.h" 2 3 4
extern long int pathconf (__const char *__path, int __name)
throw () __attribute__ ((__nonnull__ (1)));
extern long int fpathconf (int __fd, int __name) throw ();
extern long int sysconf (int __name) throw ();
extern size_t confstr (int __name, char *__buf, size_t __len) throw ();
extern __pid_t getpid (void) throw ();
extern __pid_t getppid (void) throw ();
extern __pid_t getpgrp (void) throw ();
# 643 "/usr/include/unistd.h" 3 4
extern __pid_t __getpgid (__pid_t __pid) throw ();
extern __pid_t getpgid (__pid_t __pid) throw ();
extern int setpgid (__pid_t __pid, __pid_t __pgid) throw ();
# 669 "/usr/include/unistd.h" 3 4
extern int setpgrp (void) throw ();
# 686 "/usr/include/unistd.h" 3 4
extern __pid_t setsid (void) throw ();
extern __pid_t getsid (__pid_t __pid) throw ();
extern __uid_t getuid (void) throw ();
extern __uid_t geteuid (void) throw ();
extern __gid_t getgid (void) throw ();
extern __gid_t getegid (void) throw ();
extern int getgroups (int __size, __gid_t __list[]) throw () ;
extern int group_member (__gid_t __gid) throw ();
extern int setuid (__uid_t __uid) throw ();
extern int setreuid (__uid_t __ruid, __uid_t __euid) throw ();
extern int seteuid (__uid_t __uid) throw ();
extern int setgid (__gid_t __gid) throw ();
extern int setregid (__gid_t __rgid, __gid_t __egid) throw ();
extern int setegid (__gid_t __gid) throw ();
extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid)
throw ();
extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid)
throw ();
extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid)
throw ();
extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid)
throw ();
extern __pid_t fork (void) throw ();
extern __pid_t vfork (void) throw ();
extern char *ttyname (int __fd) throw ();
extern int ttyname_r (int __fd, char *__buf, size_t __buflen)
throw () __attribute__ ((__nonnull__ (2))) ;
extern int isatty (int __fd) throw ();
extern int ttyslot (void) throw ();
extern int link (__const char *__from, __const char *__to)
throw () __attribute__ ((__nonnull__ (1, 2))) ;
extern int linkat (int __fromfd, __const char *__from, int __tofd,
__const char *__to, int __flags)
throw () __attribute__ ((__nonnull__ (2, 4))) ;
extern int symlink (__const char *__from, __const char *__to)
throw () __attribute__ ((__nonnull__ (1, 2))) ;
extern ssize_t readlink (__const char *__restrict __path,
char *__restrict __buf, size_t __len)
throw () __attribute__ ((__nonnull__ (1, 2))) ;
extern int symlinkat (__const char *__from, int __tofd,
__const char *__to) throw () __attribute__ ((__nonnull__ (1, 3))) ;
extern ssize_t readlinkat (int __fd, __const char *__restrict __path,
char *__restrict __buf, size_t __len)
throw () __attribute__ ((__nonnull__ (2, 3))) ;
extern int unlink (__const char *__name) throw () __attribute__ ((__nonnull__ (1)));
extern int unlinkat (int __fd, __const char *__name, int __flag)
throw () __attribute__ ((__nonnull__ (2)));
extern int rmdir (__const char *__path) throw () __attribute__ ((__nonnull__ (1)));
extern __pid_t tcgetpgrp (int __fd) throw ();
extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) throw ();
extern char *getlogin (void);
extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1)));
extern int setlogin (__const char *__name) throw () __attribute__ ((__nonnull__ (1)));
# 890 "/usr/include/unistd.h" 3 4
# 1 "/usr/include/getopt.h" 1 3 4
# 50 "/usr/include/getopt.h" 3 4
extern "C" {
# 59 "/usr/include/getopt.h" 3 4
extern char *optarg;
# 73 "/usr/include/getopt.h" 3 4
extern int optind;
extern int opterr;
extern int optopt;
# 152 "/usr/include/getopt.h" 3 4
extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
throw ();
# 187 "/usr/include/getopt.h" 3 4
}
# 891 "/usr/include/unistd.h" 2 3 4
extern int gethostname (char *__name, size_t __len) throw () __attribute__ ((__nonnull__ (1)));
extern int sethostname (__const char *__name, size_t __len)
throw () __attribute__ ((__nonnull__ (1))) ;
extern int sethostid (long int __id) throw () ;
extern int getdomainname (char *__name, size_t __len)
throw () __attribute__ ((__nonnull__ (1))) ;
extern int setdomainname (__const char *__name, size_t __len)
throw () __attribute__ ((__nonnull__ (1))) ;
extern int vhangup (void) throw ();
extern int revoke (__const char *__file) throw () __attribute__ ((__nonnull__ (1))) ;
extern int profil (unsigned short int *__sample_buffer, size_t __size,
size_t __offset, unsigned int __scale)
throw () __attribute__ ((__nonnull__ (1)));
extern int acct (__const char *__name) throw ();
extern char *getusershell (void) throw ();
extern void endusershell (void) throw ();
extern void setusershell (void) throw ();
extern int daemon (int __nochdir, int __noclose) throw () ;
extern int chroot (__const char *__path) throw () __attribute__ ((__nonnull__ (1))) ;
extern char *getpass (__const char *__prompt) __attribute__ ((__nonnull__ (1)));
# 976 "/usr/include/unistd.h" 3 4
extern int fsync (int __fd);
extern long int gethostid (void);
extern void sync (void) throw ();
extern int getpagesize (void) throw () __attribute__ ((__const__));
extern int getdtablesize (void) throw ();
# 1007 "/usr/include/unistd.h" 3 4
extern int truncate (__const char *__file, __off_t __length)
throw () __attribute__ ((__nonnull__ (1))) ;
# 1019 "/usr/include/unistd.h" 3 4
extern int truncate64 (__const char *__file, __off64_t __length)
throw () __attribute__ ((__nonnull__ (1))) ;
extern int ftruncate (int __fd, __off_t __length) throw () ;
# 1036 "/usr/include/unistd.h" 3 4
extern int ftruncate64 (int __fd, __off64_t __length) throw () ;
# 1047 "/usr/include/unistd.h" 3 4
extern int brk (void *__addr) throw () ;
extern void *sbrk (intptr_t __delta) throw ();
# 1068 "/usr/include/unistd.h" 3 4
extern long int syscall (long int __sysno, ...) throw ();
# 1122 "/usr/include/unistd.h" 3 4
extern int fdatasync (int __fildes);
extern char *crypt (__const char *__key, __const char *__salt)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern void encrypt (char *__block, int __edflag) throw () __attribute__ ((__nonnull__ (1)));
extern void swab (__const void *__restrict __from, void *__restrict __to,
ssize_t __n) throw () __attribute__ ((__nonnull__ (1, 2)));
extern char *ctermid (char *__s) throw ();
# 1160 "/usr/include/unistd.h" 3 4
}
# 203 "ev.c" 2
# 381 "ev.c"
# 1 "/usr/include/sys/syscall.h" 1 3 4
# 25 "/usr/include/sys/syscall.h" 3 4
# 1 "/usr/include/asm/unistd.h" 1 3 4
# 1 "/usr/include/asm/unistd_64.h" 1 3 4
# 16 "/usr/include/asm/unistd_64.h" 3 4
# 5 "/usr/include/asm/unistd.h" 2 3 4
# 26 "/usr/include/sys/syscall.h" 2 3 4
# 1 "/usr/include/bits/syscall.h" 1 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 8 "/usr/include/bits/syscall.h" 2 3 4
# 33 "/usr/include/sys/syscall.h" 2 3 4
# 382 "ev.c" 2
# 417 "ev.c"
# 1 "/usr/include/sys/statfs.h" 1 3 4
# 26 "/usr/include/sys/statfs.h" 3 4
# 1 "/usr/include/bits/statfs.h" 1 3 4
# 25 "/usr/include/bits/statfs.h" 3 4
struct statfs
{
long int f_type;
long int f_bsize;
__fsblkcnt_t f_blocks;
__fsblkcnt_t f_bfree;
__fsblkcnt_t f_bavail;
__fsfilcnt_t f_files;
__fsfilcnt_t f_ffree;
__fsid_t f_fsid;
long int f_namelen;
long int f_frsize;
long int f_flags;
long int f_spare[4];
};
struct statfs64
{
long int f_type;
long int f_bsize;
__fsblkcnt64_t f_blocks;
__fsblkcnt64_t f_bfree;
__fsblkcnt64_t f_bavail;
__fsfilcnt64_t f_files;
__fsfilcnt64_t f_ffree;
__fsid_t f_fsid;
long int f_namelen;
long int f_frsize;
long int f_flags;
long int f_spare[4];
};
# 27 "/usr/include/sys/statfs.h" 2 3 4
extern "C" {
extern int statfs (__const char *__file, struct statfs *__buf)
throw () __attribute__ ((__nonnull__ (1, 2)));
# 44 "/usr/include/sys/statfs.h" 3 4
extern int statfs64 (__const char *__file, struct statfs64 *__buf)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern int fstatfs (int __fildes, struct statfs *__buf)
throw () __attribute__ ((__nonnull__ (2)));
# 62 "/usr/include/sys/statfs.h" 3 4
extern int fstatfs64 (int __fildes, struct statfs64 *__buf)
throw () __attribute__ ((__nonnull__ (2)));
}
# 418 "ev.c" 2
# 1 "/usr/include/sys/inotify.h" 1 3 4
# 22 "/usr/include/sys/inotify.h" 3 4
# 1 "/usr/include/stdint.h" 1 3 4
# 27 "/usr/include/stdint.h" 3 4
# 1 "/usr/include/bits/wchar.h" 1 3 4
# 28 "/usr/include/stdint.h" 2 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 29 "/usr/include/stdint.h" 2 3 4
# 49 "/usr/include/stdint.h" 3 4
typedef unsigned char uint8_t;
typedef unsigned short int uint16_t;
typedef unsigned int uint32_t;
typedef unsigned long int uint64_t;
# 66 "/usr/include/stdint.h" 3 4
typedef signed char int_least8_t;
typedef short int int_least16_t;
typedef int int_least32_t;
typedef long int int_least64_t;
typedef unsigned char uint_least8_t;
typedef unsigned short int uint_least16_t;
typedef unsigned int uint_least32_t;
typedef unsigned long int uint_least64_t;
# 91 "/usr/include/stdint.h" 3 4
typedef signed char int_fast8_t;
typedef long int int_fast16_t;
typedef long int int_fast32_t;
typedef long int int_fast64_t;
# 104 "/usr/include/stdint.h" 3 4
typedef unsigned char uint_fast8_t;
typedef unsigned long int uint_fast16_t;
typedef unsigned long int uint_fast32_t;
typedef unsigned long int uint_fast64_t;
# 123 "/usr/include/stdint.h" 3 4
typedef unsigned long int uintptr_t;
# 135 "/usr/include/stdint.h" 3 4
typedef long int intmax_t;
typedef unsigned long int uintmax_t;
# 23 "/usr/include/sys/inotify.h" 2 3 4
enum
{
IN_CLOEXEC = 02000000,
IN_NONBLOCK = 04000
};
struct inotify_event
{
int wd;
uint32_t mask;
uint32_t cookie;
uint32_t len;
char name [];
};
# 87 "/usr/include/sys/inotify.h" 3 4
extern "C" {
extern int inotify_init (void) throw ();
extern int inotify_init1 (int __flags) throw ();
extern int inotify_add_watch (int __fd, const char *__name, uint32_t __mask)
throw ();
extern int inotify_rm_watch (int __fd, int __wd) throw ();
}
# 419 "ev.c" 2
# 439 "ev.c"
extern "C" int (eventfd) (unsigned int initval, int flags);
# 455 "ev.c"
extern "C" int signalfd (int fd, const sigset_t *mask, int flags);
struct signalfd_siginfo
{
uint32_t ssi_signo;
char pad[128 - sizeof (uint32_t)];
};
# 546 "ev.c"
# 1 "/usr/include/inttypes.h" 1 3 4
# 274 "/usr/include/inttypes.h" 3 4
extern "C" {
typedef struct
{
long int quot;
long int rem;
} imaxdiv_t;
# 298 "/usr/include/inttypes.h" 3 4
extern intmax_t imaxabs (intmax_t __n) throw () __attribute__ ((__const__));
extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom)
throw () __attribute__ ((__const__));
extern intmax_t strtoimax (__const char *__restrict __nptr,
char **__restrict __endptr, int __base) throw ();
extern uintmax_t strtoumax (__const char *__restrict __nptr,
char ** __restrict __endptr, int __base) throw ();
extern intmax_t wcstoimax (__const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr, int __base)
throw ();
extern uintmax_t wcstoumax (__const wchar_t *__restrict __nptr,
wchar_t ** __restrict __endptr, int __base)
throw ();
# 442 "/usr/include/inttypes.h" 3 4
}
# 547 "ev.c" 2
# 739 "ev.c"
typedef int ecb_bool;
# 877 "ev.c"
static inline ecb_bool ecb_is_pot32 (uint32_t x) __attribute__((__const__));
static inline ecb_bool ecb_is_pot32 (uint32_t x) { return !(x & (x - 1)); }
static inline ecb_bool ecb_is_pot64 (uint64_t x) __attribute__((__const__));
static inline ecb_bool ecb_is_pot64 (uint64_t x) { return !(x & (x - 1)); }
static inline uint8_t ecb_bitrev8 (uint8_t x) __attribute__((__const__));
static inline uint8_t ecb_bitrev8 (uint8_t x)
{
return ( (x * 0x0802U & 0x22110U)
| (x * 0x8020U & 0x88440U)) * 0x10101U >> 16;
}
static inline uint16_t ecb_bitrev16 (uint16_t x) __attribute__((__const__));
static inline uint16_t ecb_bitrev16 (uint16_t x)
{
x = ((x >> 1) & 0x5555) | ((x & 0x5555) << 1);
x = ((x >> 2) & 0x3333) | ((x & 0x3333) << 2);
x = ((x >> 4) & 0x0f0f) | ((x & 0x0f0f) << 4);
x = ( x >> 8 ) | ( x << 8);
return x;
}
static inline uint32_t ecb_bitrev32 (uint32_t x) __attribute__((__const__));
static inline uint32_t ecb_bitrev32 (uint32_t x)
{
x = ((x >> 1) & 0x55555555) | ((x & 0x55555555) << 1);
x = ((x >> 2) & 0x33333333) | ((x & 0x33333333) << 2);
x = ((x >> 4) & 0x0f0f0f0f) | ((x & 0x0f0f0f0f) << 4);
x = ((x >> 8) & 0x00ff00ff) | ((x & 0x00ff00ff) << 8);
x = ( x >> 16 ) | ( x << 16);
return x;
}
static inline int ecb_popcount64 (uint64_t x) __attribute__((__const__));
static inline int
ecb_popcount64 (uint64_t x)
{
return __builtin_popcount (x) + __builtin_popcount (x >> 32);
}
static inline uint8_t ecb_rotl8 (uint8_t x, unsigned int count) __attribute__((__const__));
static inline uint8_t ecb_rotr8 (uint8_t x, unsigned int count) __attribute__((__const__));
static inline uint16_t ecb_rotl16 (uint16_t x, unsigned int count) __attribute__((__const__));
static inline uint16_t ecb_rotr16 (uint16_t x, unsigned int count) __attribute__((__const__));
static inline uint32_t ecb_rotl32 (uint32_t x, unsigned int count) __attribute__((__const__));
static inline uint32_t ecb_rotr32 (uint32_t x, unsigned int count) __attribute__((__const__));
static inline uint64_t ecb_rotl64 (uint64_t x, unsigned int count) __attribute__((__const__));
static inline uint64_t ecb_rotr64 (uint64_t x, unsigned int count) __attribute__((__const__));
static inline uint8_t ecb_rotl8 (uint8_t x, unsigned int count) { return (x >> ( 8 - count)) | (x << count); }
static inline uint8_t ecb_rotr8 (uint8_t x, unsigned int count) { return (x << ( 8 - count)) | (x >> count); }
static inline uint16_t ecb_rotl16 (uint16_t x, unsigned int count) { return (x >> (16 - count)) | (x << count); }
static inline uint16_t ecb_rotr16 (uint16_t x, unsigned int count) { return (x << (16 - count)) | (x >> count); }
static inline uint32_t ecb_rotl32 (uint32_t x, unsigned int count) { return (x >> (32 - count)) | (x << count); }
static inline uint32_t ecb_rotr32 (uint32_t x, unsigned int count) { return (x << (32 - count)) | (x >> count); }
static inline uint64_t ecb_rotl64 (uint64_t x, unsigned int count) { return (x >> (64 - count)) | (x << count); }
static inline uint64_t ecb_rotr64 (uint64_t x, unsigned int count) { return (x << (64 - count)) | (x >> count); }
# 970 "ev.c"
static inline void ecb_unreachable (void) __attribute__((__noreturn__));
static inline void ecb_unreachable (void) { }
static inline unsigned char ecb_byteorder_helper (void) __attribute__((__const__));
static inline unsigned char
ecb_byteorder_helper (void)
{
return 0x44;
# 1001 "ev.c"
}
static inline ecb_bool ecb_big_endian (void) __attribute__((__const__));
static inline ecb_bool ecb_big_endian (void) { return ecb_byteorder_helper () == 0x11; }
static inline ecb_bool ecb_little_endian (void) __attribute__((__const__));
static inline ecb_bool ecb_little_endian (void) { return ecb_byteorder_helper () == 0x44; }
# 1015 "ev.c"
template<typename T>
static inline T ecb_div_rd (T val, T div)
{
return val < 0 ? - ((-val + div - 1) / div) : (val ) / div;
}
template<typename T>
static inline T ecb_div_ru (T val, T div)
{
return val < 0 ? - ((-val ) / div) : (val + div - 1) / div;
}
# 1067 "ev.c"
static inline uint32_t ecb_float_to_binary32 (float x) __attribute__((__const__));
static inline uint32_t
ecb_float_to_binary32 (float x)
{
uint32_t r;
memcpy (&r, &x, 4);
# 1103 "ev.c"
return r;
}
static inline float ecb_binary32_to_float (uint32_t x) __attribute__((__const__));
static inline float
ecb_binary32_to_float (uint32_t x)
{
float r;
memcpy (&r, &x, 4);
# 1133 "ev.c"
return r;
}
static inline uint64_t ecb_double_to_binary64 (double x) __attribute__((__const__));
static inline uint64_t
ecb_double_to_binary64 (double x)
{
uint64_t r;
memcpy (&r, &x, 8);
# 1173 "ev.c"
return r;
}
static inline double ecb_binary64_to_double (uint64_t x) __attribute__((__const__));
static inline double
ecb_binary64_to_double (uint64_t x)
{
double r;
memcpy (&r, &x, 8);
# 1203 "ev.c"
return r;
}
# 1252 "ev.c"
typedef ev_watcher *W;
typedef ev_watcher_list *WL;
typedef ev_watcher_time *WT;
# 1266 "ev.c"
static sig_atomic_t volatile have_monotonic;
# 1288 "ev.c"
# 1 "/usr/include/math.h" 1 3 4
# 30 "/usr/include/math.h" 3 4
extern "C" {
# 1 "/usr/include/bits/huge_val.h" 1 3 4
# 35 "/usr/include/math.h" 2 3 4
# 1 "/usr/include/bits/huge_valf.h" 1 3 4
# 37 "/usr/include/math.h" 2 3 4
# 1 "/usr/include/bits/huge_vall.h" 1 3 4
# 38 "/usr/include/math.h" 2 3 4
# 1 "/usr/include/bits/inf.h" 1 3 4
# 41 "/usr/include/math.h" 2 3 4
# 1 "/usr/include/bits/nan.h" 1 3 4
# 44 "/usr/include/math.h" 2 3 4
# 1 "/usr/include/bits/mathdef.h" 1 3 4
# 26 "/usr/include/bits/mathdef.h" 3 4
# 1 "/usr/include/bits/wordsize.h" 1 3 4
# 27 "/usr/include/bits/mathdef.h" 2 3 4
typedef float float_t;
typedef double double_t;
# 48 "/usr/include/math.h" 2 3 4
# 71 "/usr/include/math.h" 3 4
# 1 "/usr/include/bits/mathcalls.h" 1 3 4
# 53 "/usr/include/bits/mathcalls.h" 3 4
extern double acos (double __x) throw (); extern double __acos (double __x) throw ();
extern double asin (double __x) throw (); extern double __asin (double __x) throw ();
extern double atan (double __x) throw (); extern double __atan (double __x) throw ();
extern double atan2 (double __y, double __x) throw (); extern double __atan2 (double __y, double __x) throw ();
extern double cos (double __x) throw (); extern double __cos (double __x) throw ();
extern double sin (double __x) throw (); extern double __sin (double __x) throw ();
extern double tan (double __x) throw (); extern double __tan (double __x) throw ();
extern double cosh (double __x) throw (); extern double __cosh (double __x) throw ();
extern double sinh (double __x) throw (); extern double __sinh (double __x) throw ();
extern double tanh (double __x) throw (); extern double __tanh (double __x) throw ();
extern void sincos (double __x, double *__sinx, double *__cosx) throw (); extern void __sincos (double __x, double *__sinx, double *__cosx) throw ()
;
extern double acosh (double __x) throw (); extern double __acosh (double __x) throw ();
extern double asinh (double __x) throw (); extern double __asinh (double __x) throw ();
extern double atanh (double __x) throw (); extern double __atanh (double __x) throw ();
extern double exp (double __x) throw (); extern double __exp (double __x) throw ();
extern double frexp (double __x, int *__exponent) throw (); extern double __frexp (double __x, int *__exponent) throw ();
extern double ldexp (double __x, int __exponent) throw (); extern double __ldexp (double __x, int __exponent) throw ();
extern double log (double __x) throw (); extern double __log (double __x) throw ();
extern double log10 (double __x) throw (); extern double __log10 (double __x) throw ();
extern double modf (double __x, double *__iptr) throw (); extern double __modf (double __x, double *__iptr) throw ();
extern double exp10 (double __x) throw (); extern double __exp10 (double __x) throw ();
extern double pow10 (double __x) throw (); extern double __pow10 (double __x) throw ();
extern double expm1 (double __x) throw (); extern double __expm1 (double __x) throw ();
extern double log1p (double __x) throw (); extern double __log1p (double __x) throw ();
extern double logb (double __x) throw (); extern double __logb (double __x) throw ();
extern double exp2 (double __x) throw (); extern double __exp2 (double __x) throw ();
extern double log2 (double __x) throw (); extern double __log2 (double __x) throw ();
extern double pow (double __x, double __y) throw (); extern double __pow (double __x, double __y) throw ();
extern double sqrt (double __x) throw (); extern double __sqrt (double __x) throw ();
extern double hypot (double __x, double __y) throw (); extern double __hypot (double __x, double __y) throw ();
extern double cbrt (double __x) throw (); extern double __cbrt (double __x) throw ();
extern double ceil (double __x) throw () __attribute__ ((__const__)); extern double __ceil (double __x) throw () __attribute__ ((__const__));
extern double fabs (double __x) throw () __attribute__ ((__const__)); extern double __fabs (double __x) throw () __attribute__ ((__const__));
extern double floor (double __x) throw () __attribute__ ((__const__)); extern double __floor (double __x) throw () __attribute__ ((__const__));
extern double fmod (double __x, double __y) throw (); extern double __fmod (double __x, double __y) throw ();
extern int __isinf (double __value) throw () __attribute__ ((__const__));
extern int __finite (double __value) throw () __attribute__ ((__const__));
extern int isinf (double __value) throw () __attribute__ ((__const__));
extern int finite (double __value) throw () __attribute__ ((__const__));
extern double drem (double __x, double __y) throw (); extern double __drem (double __x, double __y) throw ();
extern double significand (double __x) throw (); extern double __significand (double __x) throw ();
extern double copysign (double __x, double __y) throw () __attribute__ ((__const__)); extern double __copysign (double __x, double __y) throw () __attribute__ ((__const__));
extern double nan (__const char *__tagb) throw () __attribute__ ((__const__)); extern double __nan (__const char *__tagb) throw () __attribute__ ((__const__));
extern int __isnan (double __value) throw () __attribute__ ((__const__));
extern int isnan (double __value) throw () __attribute__ ((__const__));
extern double j0 (double) throw (); extern double __j0 (double) throw ();
extern double j1 (double) throw (); extern double __j1 (double) throw ();
extern double jn (int, double) throw (); extern double __jn (int, double) throw ();
extern double y0 (double) throw (); extern double __y0 (double) throw ();
extern double y1 (double) throw (); extern double __y1 (double) throw ();
extern double yn (int, double) throw (); extern double __yn (int, double) throw ();
extern double erf (double) throw (); extern double __erf (double) throw ();
extern double erfc (double) throw (); extern double __erfc (double) throw ();
extern double lgamma (double) throw (); extern double __lgamma (double) throw ();
extern double tgamma (double) throw (); extern double __tgamma (double) throw ();
extern double gamma (double) throw (); extern double __gamma (double) throw ();
extern double lgamma_r (double, int *__signgamp) throw (); extern double __lgamma_r (double, int *__signgamp) throw ();
extern double rint (double __x) throw (); extern double __rint (double __x) throw ();
extern double nextafter (double __x, double __y) throw () __attribute__ ((__const__)); extern double __nextafter (double __x, double __y) throw () __attribute__ ((__const__));
extern double nexttoward (double __x, long double __y) throw () __attribute__ ((__const__)); extern double __nexttoward (double __x, long double __y) throw () __attribute__ ((__const__));
extern double remainder (double __x, double __y) throw (); extern double __remainder (double __x, double __y) throw ();
extern double scalbn (double __x, int __n) throw (); extern double __scalbn (double __x, int __n) throw ();
extern int ilogb (double __x) throw (); extern int __ilogb (double __x) throw ();
extern double scalbln (double __x, long int __n) throw (); extern double __scalbln (double __x, long int __n) throw ();
extern double nearbyint (double __x) throw (); extern double __nearbyint (double __x) throw ();
extern double round (double __x) throw () __attribute__ ((__const__)); extern double __round (double __x) throw () __attribute__ ((__const__));
extern double trunc (double __x) throw () __attribute__ ((__const__)); extern double __trunc (double __x) throw () __attribute__ ((__const__));
extern double remquo (double __x, double __y, int *__quo) throw (); extern double __remquo (double __x, double __y, int *__quo) throw ();
extern long int lrint (double __x) throw (); extern long int __lrint (double __x) throw ();
extern long long int llrint (double __x) throw (); extern long long int __llrint (double __x) throw ();
extern long int lround (double __x) throw (); extern long int __lround (double __x) throw ();
extern long long int llround (double __x) throw (); extern long long int __llround (double __x) throw ();
extern double fdim (double __x, double __y) throw (); extern double __fdim (double __x, double __y) throw ();
extern double fmax (double __x, double __y) throw (); extern double __fmax (double __x, double __y) throw ();
extern double fmin (double __x, double __y) throw (); extern double __fmin (double __x, double __y) throw ();
extern int __fpclassify (double __value) throw ()
__attribute__ ((__const__));
extern int __signbit (double __value) throw ()
__attribute__ ((__const__));
extern double fma (double __x, double __y, double __z) throw (); extern double __fma (double __x, double __y, double __z) throw ();
extern double scalb (double __x, double __n) throw (); extern double __scalb (double __x, double __n) throw ();
# 72 "/usr/include/math.h" 2 3 4
# 94 "/usr/include/math.h" 3 4
# 1 "/usr/include/bits/mathcalls.h" 1 3 4
# 53 "/usr/include/bits/mathcalls.h" 3 4
extern float acosf (float __x) throw (); extern float __acosf (float __x) throw ();
extern float asinf (float __x) throw (); extern float __asinf (float __x) throw ();
extern float atanf (float __x) throw (); extern float __atanf (float __x) throw ();
extern float atan2f (float __y, float __x) throw (); extern float __atan2f (float __y, float __x) throw ();
extern float cosf (float __x) throw (); extern float __cosf (float __x) throw ();
extern float sinf (float __x) throw (); extern float __sinf (float __x) throw ();
extern float tanf (float __x) throw (); extern float __tanf (float __x) throw ();
extern float coshf (float __x) throw (); extern float __coshf (float __x) throw ();
extern float sinhf (float __x) throw (); extern float __sinhf (float __x) throw ();
extern float tanhf (float __x) throw (); extern float __tanhf (float __x) throw ();
extern void
sincosf
# 82 "/usr/include/bits/mathcalls.h" 3 4
(float __x, float *__sinx, float *__cosx) throw (); extern void
__sincosf
# 82 "/usr/include/bits/mathcalls.h" 3 4
(float __x, float *__sinx, float *__cosx) throw ()
;
extern float acoshf (float __x) throw (); extern float __acoshf (float __x) throw ();
extern float asinhf (float __x) throw (); extern float __asinhf (float __x) throw ();
extern float atanhf (float __x) throw (); extern float __atanhf (float __x) throw ();
extern float expf (float __x) throw (); extern float __expf (float __x) throw ();
extern float frexpf (float __x, int *__exponent) throw (); extern float __frexpf (float __x, int *__exponent) throw ();
extern float ldexpf (float __x, int __exponent) throw (); extern float __ldexpf (float __x, int __exponent) throw ();
extern float logf (float __x) throw (); extern float __logf (float __x) throw ();
extern float log10f (float __x) throw (); extern float __log10f (float __x) throw ();
extern float modff (float __x, float *__iptr) throw (); extern float __modff (float __x, float *__iptr) throw ();
extern float exp10f (float __x) throw (); extern float __exp10f (float __x) throw ();
extern float pow10f (float __x) throw (); extern float __pow10f (float __x) throw ();
extern float expm1f (float __x) throw (); extern float __expm1f (float __x) throw ();
extern float log1pf (float __x) throw (); extern float __log1pf (float __x) throw ();
extern float logbf (float __x) throw (); extern float __logbf (float __x) throw ();
extern float exp2f (float __x) throw (); extern float __exp2f (float __x) throw ();
extern float log2f (float __x) throw (); extern float __log2f (float __x) throw ();
extern float powf (float __x, float __y) throw (); extern float __powf (float __x, float __y) throw ();
extern float sqrtf (float __x) throw (); extern float __sqrtf (float __x) throw ();
extern float hypotf (float __x, float __y) throw (); extern float __hypotf (float __x, float __y) throw ();
extern float cbrtf (float __x) throw (); extern float __cbrtf (float __x) throw ();
extern float ceilf (float __x) throw () __attribute__ ((__const__)); extern float __ceilf (float __x) throw () __attribute__ ((__const__));
extern float fabsf (float __x) throw () __attribute__ ((__const__)); extern float __fabsf (float __x) throw () __attribute__ ((__const__));
extern float floorf (float __x) throw () __attribute__ ((__const__)); extern float __floorf (float __x) throw () __attribute__ ((__const__));
extern float fmodf (float __x, float __y) throw (); extern float __fmodf (float __x, float __y) throw ();
extern int __isinff (float __value) throw () __attribute__ ((__const__));
extern int __finitef (float __value) throw () __attribute__ ((__const__));
extern int isinff (float __value) throw () __attribute__ ((__const__));
extern int finitef (float __value) throw () __attribute__ ((__const__));
extern float dremf (float __x, float __y) throw (); extern float __dremf (float __x, float __y) throw ();
extern float significandf (float __x) throw (); extern float __significandf (float __x) throw ();
extern float copysignf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) throw () __attribute__ ((__const__));
extern float nanf (__const char *__tagb) throw () __attribute__ ((__const__)); extern float __nanf (__const char *__tagb) throw () __attribute__ ((__const__));
extern int __isnanf (float __value) throw () __attribute__ ((__const__));
extern int isnanf (float __value) throw () __attribute__ ((__const__));
extern float j0f (float) throw (); extern float __j0f (float) throw ();
extern float j1f (float) throw (); extern float __j1f (float) throw ();
extern float jnf (int, float) throw (); extern float __jnf (int, float) throw ();
extern float y0f (float) throw (); extern float __y0f (float) throw ();
extern float y1f (float) throw (); extern float __y1f (float) throw ();
extern float ynf (int, float) throw (); extern float __ynf (int, float) throw ();
extern float erff (float) throw (); extern float __erff (float) throw ();
extern float erfcf (float) throw (); extern float __erfcf (float) throw ();
extern float lgammaf (float) throw (); extern float __lgammaf (float) throw ();
extern float tgammaf (float) throw (); extern float __tgammaf (float) throw ();
extern float gammaf (float) throw (); extern float __gammaf (float) throw ();
extern float lgammaf_r (float, int *__signgamp) throw (); extern float __lgammaf_r (float, int *__signgamp) throw ();
extern float rintf (float __x) throw (); extern float __rintf (float __x) throw ();
extern float nextafterf (float __x, float __y) throw () __attribute__ ((__const__)); extern float __nextafterf (float __x, float __y) throw () __attribute__ ((__const__));
extern float nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__)); extern float __nexttowardf (float __x, long double __y) throw () __attribute__ ((__const__));
extern float remainderf (float __x, float __y) throw (); extern float __remainderf (float __x, float __y) throw ();
extern float scalbnf (float __x, int __n) throw (); extern float __scalbnf (float __x, int __n) throw ();
extern int ilogbf (float __x) throw (); extern int __ilogbf (float __x) throw ();
extern float scalblnf (float __x, long int __n) throw (); extern float __scalblnf (float __x, long int __n) throw ();
extern float nearbyintf (float __x) throw (); extern float __nearbyintf (float __x) throw ();
extern float roundf (float __x) throw () __attribute__ ((__const__)); extern float __roundf (float __x) throw () __attribute__ ((__const__));
extern float truncf (float __x) throw () __attribute__ ((__const__)); extern float __truncf (float __x) throw () __attribute__ ((__const__));
extern float remquof (float __x, float __y, int *__quo) throw (); extern float __remquof (float __x, float __y, int *__quo) throw ();
extern long int lrintf (float __x) throw (); extern long int __lrintf (float __x) throw ();
extern long long int llrintf (float __x) throw (); extern long long int __llrintf (float __x) throw ();
extern long int lroundf (float __x) throw (); extern long int __lroundf (float __x) throw ();
extern long long int llroundf (float __x) throw (); extern long long int __llroundf (float __x) throw ();
extern float fdimf (float __x, float __y) throw (); extern float __fdimf (float __x, float __y) throw ();
extern float fmaxf (float __x, float __y) throw (); extern float __fmaxf (float __x, float __y) throw ();
extern float fminf (float __x, float __y) throw (); extern float __fminf (float __x, float __y) throw ();
extern int __fpclassifyf (float __value) throw ()
__attribute__ ((__const__));
extern int __signbitf (float __value) throw ()
__attribute__ ((__const__));
extern float fmaf (float __x, float __y, float __z) throw (); extern float __fmaf (float __x, float __y, float __z) throw ();
extern float scalbf (float __x, float __n) throw (); extern float __scalbf (float __x, float __n) throw ();
# 95 "/usr/include/math.h" 2 3 4
# 141 "/usr/include/math.h" 3 4
# 1 "/usr/include/bits/mathcalls.h" 1 3 4
# 53 "/usr/include/bits/mathcalls.h" 3 4
extern long double acosl (long double __x) throw (); extern long double __acosl (long double __x) throw ();
extern long double asinl (long double __x) throw (); extern long double __asinl (long double __x) throw ();
extern long double atanl (long double __x) throw (); extern long double __atanl (long double __x) throw ();
extern long double atan2l (long double __y, long double __x) throw (); extern long double __atan2l (long double __y, long double __x) throw ();
extern long double cosl (long double __x) throw (); extern long double __cosl (long double __x) throw ();
extern long double sinl (long double __x) throw (); extern long double __sinl (long double __x) throw ();
extern long double tanl (long double __x) throw (); extern long double __tanl (long double __x) throw ();
extern long double coshl (long double __x) throw (); extern long double __coshl (long double __x) throw ();
extern long double sinhl (long double __x) throw (); extern long double __sinhl (long double __x) throw ();
extern long double tanhl (long double __x) throw (); extern long double __tanhl (long double __x) throw ();
extern void
sincosl
# 82 "/usr/include/bits/mathcalls.h" 3 4
(long double __x, long double *__sinx, long double *__cosx) throw (); extern void
__sincosl
# 82 "/usr/include/bits/mathcalls.h" 3 4
(long double __x, long double *__sinx, long double *__cosx) throw ()
;
extern long double acoshl (long double __x) throw (); extern long double __acoshl (long double __x) throw ();
extern long double asinhl (long double __x) throw (); extern long double __asinhl (long double __x) throw ();
extern long double atanhl (long double __x) throw (); extern long double __atanhl (long double __x) throw ();
extern long double expl (long double __x) throw (); extern long double __expl (long double __x) throw ();
extern long double frexpl (long double __x, int *__exponent) throw (); extern long double __frexpl (long double __x, int *__exponent) throw ();
extern long double ldexpl (long double __x, int __exponent) throw (); extern long double __ldexpl (long double __x, int __exponent) throw ();
extern long double logl (long double __x) throw (); extern long double __logl (long double __x) throw ();
extern long double log10l (long double __x) throw (); extern long double __log10l (long double __x) throw ();
extern long double modfl (long double __x, long double *__iptr) throw (); extern long double __modfl (long double __x, long double *__iptr) throw ();
extern long double exp10l (long double __x) throw (); extern long double __exp10l (long double __x) throw ();
extern long double pow10l (long double __x) throw (); extern long double __pow10l (long double __x) throw ();
extern long double expm1l (long double __x) throw (); extern long double __expm1l (long double __x) throw ();
extern long double log1pl (long double __x) throw (); extern long double __log1pl (long double __x) throw ();
extern long double logbl (long double __x) throw (); extern long double __logbl (long double __x) throw ();
extern long double exp2l (long double __x) throw (); extern long double __exp2l (long double __x) throw ();
extern long double log2l (long double __x) throw (); extern long double __log2l (long double __x) throw ();
extern long double powl (long double __x, long double __y) throw (); extern long double __powl (long double __x, long double __y) throw ();
extern long double sqrtl (long double __x) throw (); extern long double __sqrtl (long double __x) throw ();
extern long double hypotl (long double __x, long double __y) throw (); extern long double __hypotl (long double __x, long double __y) throw ();
extern long double cbrtl (long double __x) throw (); extern long double __cbrtl (long double __x) throw ();
extern long double ceill (long double __x) throw () __attribute__ ((__const__)); extern long double __ceill (long double __x) throw () __attribute__ ((__const__));
extern long double fabsl (long double __x) throw () __attribute__ ((__const__)); extern long double __fabsl (long double __x) throw () __attribute__ ((__const__));
extern long double floorl (long double __x) throw () __attribute__ ((__const__)); extern long double __floorl (long double __x) throw () __attribute__ ((__const__));
extern long double fmodl (long double __x, long double __y) throw (); extern long double __fmodl (long double __x, long double __y) throw ();
extern int __isinfl (long double __value) throw () __attribute__ ((__const__));
extern int __finitel (long double __value) throw () __attribute__ ((__const__));
extern int isinfl (long double __value) throw () __attribute__ ((__const__));
extern int finitel (long double __value) throw () __attribute__ ((__const__));
extern long double dreml (long double __x, long double __y) throw (); extern long double __dreml (long double __x, long double __y) throw ();
extern long double significandl (long double __x) throw (); extern long double __significandl (long double __x) throw ();
extern long double copysignl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) throw () __attribute__ ((__const__));
extern long double nanl (__const char *__tagb) throw () __attribute__ ((__const__)); extern long double __nanl (__const char *__tagb) throw () __attribute__ ((__const__));
extern int __isnanl (long double __value) throw () __attribute__ ((__const__));
extern int isnanl (long double __value) throw () __attribute__ ((__const__));
extern long double j0l (long double) throw (); extern long double __j0l (long double) throw ();
extern long double j1l (long double) throw (); extern long double __j1l (long double) throw ();
extern long double jnl (int, long double) throw (); extern long double __jnl (int, long double) throw ();
extern long double y0l (long double) throw (); extern long double __y0l (long double) throw ();
extern long double y1l (long double) throw (); extern long double __y1l (long double) throw ();
extern long double ynl (int, long double) throw (); extern long double __ynl (int, long double) throw ();
extern long double erfl (long double) throw (); extern long double __erfl (long double) throw ();
extern long double erfcl (long double) throw (); extern long double __erfcl (long double) throw ();
extern long double lgammal (long double) throw (); extern long double __lgammal (long double) throw ();
extern long double tgammal (long double) throw (); extern long double __tgammal (long double) throw ();
extern long double gammal (long double) throw (); extern long double __gammal (long double) throw ();
extern long double lgammal_r (long double, int *__signgamp) throw (); extern long double __lgammal_r (long double, int *__signgamp) throw ();
extern long double rintl (long double __x) throw (); extern long double __rintl (long double __x) throw ();
extern long double nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nextafterl (long double __x, long double __y) throw () __attribute__ ((__const__));
extern long double nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__)); extern long double __nexttowardl (long double __x, long double __y) throw () __attribute__ ((__const__));
extern long double remainderl (long double __x, long double __y) throw (); extern long double __remainderl (long double __x, long double __y) throw ();
extern long double scalbnl (long double __x, int __n) throw (); extern long double __scalbnl (long double __x, int __n) throw ();
extern int ilogbl (long double __x) throw (); extern int __ilogbl (long double __x) throw ();
extern long double scalblnl (long double __x, long int __n) throw (); extern long double __scalblnl (long double __x, long int __n) throw ();
extern long double nearbyintl (long double __x) throw (); extern long double __nearbyintl (long double __x) throw ();
extern long double roundl (long double __x) throw () __attribute__ ((__const__)); extern long double __roundl (long double __x) throw () __attribute__ ((__const__));
extern long double truncl (long double __x) throw () __attribute__ ((__const__)); extern long double __truncl (long double __x) throw () __attribute__ ((__const__));
extern long double remquol (long double __x, long double __y, int *__quo) throw (); extern long double __remquol (long double __x, long double __y, int *__quo) throw ();
extern long int lrintl (long double __x) throw (); extern long int __lrintl (long double __x) throw ();
extern long long int llrintl (long double __x) throw (); extern long long int __llrintl (long double __x) throw ();
extern long int lroundl (long double __x) throw (); extern long int __lroundl (long double __x) throw ();
extern long long int llroundl (long double __x) throw (); extern long long int __llroundl (long double __x) throw ();
extern long double fdiml (long double __x, long double __y) throw (); extern long double __fdiml (long double __x, long double __y) throw ();
extern long double fmaxl (long double __x, long double __y) throw (); extern long double __fmaxl (long double __x, long double __y) throw ();
extern long double fminl (long double __x, long double __y) throw (); extern long double __fminl (long double __x, long double __y) throw ();
extern int __fpclassifyl (long double __value) throw ()
__attribute__ ((__const__));
extern int __signbitl (long double __value) throw ()
__attribute__ ((__const__));
extern long double fmal (long double __x, long double __y, long double __z) throw (); extern long double __fmal (long double __x, long double __y, long double __z) throw ();
extern long double scalbl (long double __x, long double __n) throw (); extern long double __scalbl (long double __x, long double __n) throw ();
# 142 "/usr/include/math.h" 2 3 4
# 157 "/usr/include/math.h" 3 4
extern int signgam;
# 198 "/usr/include/math.h" 3 4
enum
{
FP_NAN,
FP_INFINITE,
FP_ZERO,
FP_SUBNORMAL,
FP_NORMAL
};
# 291 "/usr/include/math.h" 3 4
typedef enum
{
_IEEE_ = -1,
_SVID_,
_XOPEN_,
_POSIX_,
_ISOC_
} _LIB_VERSION_TYPE;
extern _LIB_VERSION_TYPE _LIB_VERSION;
# 314 "/usr/include/math.h" 3 4
struct __exception
{
int type;
char *name;
double arg1;
double arg2;
double retval;
};
extern int matherr (struct __exception *__exc) throw ();
# 472 "/usr/include/math.h" 3 4
}
# 1289 "ev.c" 2
# 1334 "ev.c"
# 1 "/usr/include/sys/utsname.h" 1 3 4
# 28 "/usr/include/sys/utsname.h" 3 4
extern "C" {
# 1 "/usr/include/bits/utsname.h" 1 3 4
# 31 "/usr/include/sys/utsname.h" 2 3 4
# 49 "/usr/include/sys/utsname.h" 3 4
struct utsname
{
char sysname[65];
char nodename[65];
char release[65];
char version[65];
char machine[65];
char domainname[65];
};
# 82 "/usr/include/sys/utsname.h" 3 4
extern int uname (struct utsname *__name) throw ();
}
# 1335 "ev.c" 2
static unsigned int __attribute__((__noinline__)) __attribute__((__cold__))
ev_linux_version (void)
{
unsigned int v = 0;
struct utsname buf;
int i;
char *p = buf.release;
if (uname (&buf))
return 0;
for (i = 3+1; --i; )
{
unsigned int c = 0;
for (;;)
{
if (*p >= '0' && *p <= '9')
c = c * 10 + *p++ - '0';
else
{
p += *p == '.';
break;
}
}
v = (v << 8) | c;
}
return v;
}
# 1383 "ev.c"
static void (*syserr_cb)(const char *msg) throw();
void __attribute__((__cold__))
ev_set_syserr_cb (void (*cb)(const char *msg) throw()) throw()
{
syserr_cb = cb;
}
static void __attribute__((__noinline__)) __attribute__((__cold__))
ev_syserr (const char *msg)
{
if (!msg)
msg = "(libev) system error";
if (syserr_cb)
syserr_cb (msg);
else
{
perror (msg);
abort ();
}
}
static void *
ev_realloc_emul (void *ptr, long size) throw()
{
if (size)
return realloc (ptr, size);
free (ptr);
return 0;
}
static void *(*alloc)(void *ptr, long size) throw() = ev_realloc_emul;
void __attribute__((__cold__))
ev_set_allocator (void *(*cb)(void *ptr, long size) throw()) throw()
{
alloc = cb;
}
static inline void *
ev_realloc (void *ptr, long size)
{
ptr = alloc (ptr, size);
if (!ptr && size)
{
fprintf (stderr, "(libev) cannot allocate %ld bytes, aborting.", size);
abort ();
}
return ptr;
}
# 1465 "ev.c"
typedef struct
{
WL head;
unsigned char events;
unsigned char reify;
unsigned char emask;
unsigned char unused;
unsigned int egen;
} ANFD;
typedef struct
{
W w;
int events;
} ANPENDING;
typedef struct
{
WL head;
} ANFS;
typedef struct {
ev_tstamp at;
WT w;
} ANHE;
# 1520 "ev.c"
struct ev_loop
{
ev_tstamp ev_rt_now;
# 1 "ev_vars.h" 1
# 42 "ev_vars.h"
ev_tstamp now_floor;
ev_tstamp mn_now;
ev_tstamp rtmn_diff;
W * rfeeds;
int rfeedmax;
int rfeedcnt;
ANPENDING *pendings [((((0x7f) & 4) ? +2 : 0) - (((0x7f) & 4) ? -2 : 0) + 1)];
int pendingmax [((((0x7f) & 4) ? +2 : 0) - (((0x7f) & 4) ? -2 : 0) + 1)];
int pendingcnt [((((0x7f) & 4) ? +2 : 0) - (((0x7f) & 4) ? -2 : 0) + 1)];
int pendingpri;
ev_prepare pending_w;
ev_tstamp io_blocktime;
ev_tstamp timeout_blocktime;
int backend;
int activecnt;
sig_atomic_t volatile loop_done;
int backend_fd;
ev_tstamp backend_mintime;
void (*backend_modify)(struct ev_loop *loop, int fd, int oev, int nev);
void (*backend_poll)(struct ev_loop *loop, ev_tstamp timeout);
ANFD * anfds;
int anfdmax;
int evpipe [2];
ev_io pipe_w;
sig_atomic_t volatile pipe_write_wanted;
sig_atomic_t volatile pipe_write_skipped;
pid_t curpid;
char postfork;
void * vec_ri;
void * vec_ro;
void * vec_wi;
void * vec_wo;
int vec_max;
struct pollfd * polls;
int pollmax;
int pollcnt;
int * pollidxs;
int pollidxmax;
struct epoll_event * epoll_events;
int epoll_eventmax;
int * epoll_eperms;
int epoll_epermcnt;
int epoll_epermmax;
# 128 "ev_vars.h"
int * fdchanges;
int fdchangemax;
int fdchangecnt;
ANHE * timers;
int timermax;
int timercnt;
ANHE * periodics;
int periodicmax;
int periodiccnt;
ev_idle **idles [((((0x7f) & 4) ? +2 : 0) - (((0x7f) & 4) ? -2 : 0) + 1)];
int idlemax [((((0x7f) & 4) ? +2 : 0) - (((0x7f) & 4) ? -2 : 0) + 1)];
int idlecnt [((((0x7f) & 4) ? +2 : 0) - (((0x7f) & 4) ? -2 : 0) + 1)];
int idleall;
struct ev_prepare ** prepares;
int preparemax;
int preparecnt;
struct ev_check ** checks;
int checkmax;
int checkcnt;
struct ev_fork ** forks;
int forkmax;
int forkcnt;
struct ev_cleanup ** cleanups;
int cleanupmax;
int cleanupcnt;
sig_atomic_t volatile async_pending;
struct ev_async ** asyncs;
int asyncmax;
int asynccnt;
int fs_fd;
ev_io fs_w;
char fs_2625;
ANFS fs_hash [((0x7f) & 2) ? 16 : 1];
sig_atomic_t volatile sig_pending;
int sigfd;
ev_io sigfd_w;
sigset_t sigfd_set;
unsigned int origflags;
unsigned int loop_count;
unsigned int loop_depth;
void * userdata;
void (*release_cb)(struct ev_loop *loop) throw();
void (*acquire_cb)(struct ev_loop *loop) throw();
void (*invoke_cb) (struct ev_loop *loop);
# 1526 "ev.c" 2
};
# 1 "ev_wrap.h" 1
# 1529 "ev.c" 2
static struct ev_loop default_loop_struct;
extern struct ev_loop *ev_default_loop_ptr = 0;
# 1559 "ev.c"
ev_tstamp
ev_time (void) throw()
{
# 1571 "ev.c"
struct timeval tv;
gettimeofday (&tv, 0);
return tv.tv_sec + tv.tv_usec * 1e-6;
}
static inline ev_tstamp
get_clock (void)
{
if (__builtin_expect ((!!(have_monotonic)),(1)))
{
struct timespec ts;
syscall (228, (1), (&ts));
return ts.tv_sec + ts.tv_nsec * 1e-9;
}
return ev_time ();
}
ev_tstamp
ev_now (struct ev_loop *loop) throw()
{
return ((loop)->ev_rt_now);
}
void
ev_sleep (ev_tstamp delay) throw()
{
if (delay > 0.)
{
struct timespec ts;
do { ts.tv_sec = (long)delay; ts.tv_nsec = (long)((delay - ts.tv_sec) * 1e9); } while (0);
nanosleep (&ts, 0);
# 1621 "ev.c"
}
}
static inline int
array_nextsize (int elem, int cur, int cnt)
{
int ncur = cur + 1;
do
ncur <<= 1;
while (cnt > ncur);
if (elem * ncur > 4096 - sizeof (void *) * 4)
{
ncur *= elem;
ncur = (ncur + elem + (4096 - 1) + sizeof (void *) * 4) & ~(4096 - 1);
ncur = ncur - sizeof (void *) * 4;
ncur /= elem;
}
return ncur;
}
static void * __attribute__((__noinline__)) __attribute__((__cold__))
array_realloc (int elem, void *base, int *cur, int cnt)
{
*cur = array_nextsize (elem, *cur, cnt);
return ev_realloc (base, elem * *cur);
}
# 1686 "ev.c"
static void __attribute__((__noinline__))
pendingcb (struct ev_loop *loop, ev_prepare *w, int revents)
{
}
void __attribute__((__noinline__))
ev_feed_event (struct ev_loop *loop, void *w, int revents) throw()
{
W w_ = (W)w;
int pri = (((W)w_)->priority - (((0x7f) & 4) ? -2 : 0));
if (__builtin_expect ((!!(w_->pending)),(0)))
((loop)->pendings) [pri][w_->pending - 1].events |= revents;
else
{
w_->pending = ++((loop)->pendingcnt) [pri];
if (__builtin_expect ((!!((w_->pending) > (((loop)->pendingmax) [pri]))),(0))) { int __attribute__((__unused__)) ocur_ = (((loop)->pendingmax) [pri]); (((loop)->pendings) [pri]) = (ANPENDING *)array_realloc (sizeof (ANPENDING), (((loop)->pendings) [pri]), &(((loop)->pendingmax) [pri]), (w_->pending)); ; };
((loop)->pendings) [pri][w_->pending - 1].w = w_;
((loop)->pendings) [pri][w_->pending - 1].events = revents;
}
((loop)->pendingpri) = ((((0x7f) & 4) ? +2 : 0) - (((0x7f) & 4) ? -2 : 0) + 1) - 1;
}
static inline void
feed_reverse (struct ev_loop *loop, W w)
{
if (__builtin_expect ((!!((((loop)->rfeedcnt) + 1) > (((loop)->rfeedmax)))),(0))) { int __attribute__((__unused__)) ocur_ = (((loop)->rfeedmax)); (((loop)->rfeeds)) = (W *)array_realloc (sizeof (W), (((loop)->rfeeds)), &(((loop)->rfeedmax)), (((loop)->rfeedcnt) + 1)); ; };
((loop)->rfeeds) [((loop)->rfeedcnt)++] = w;
}
static inline void
feed_reverse_done (struct ev_loop *loop, int revents)
{
do
ev_feed_event (loop, ((loop)->rfeeds) [--((loop)->rfeedcnt)], revents);
while (((loop)->rfeedcnt));
}
static inline void
queue_events (struct ev_loop *loop, W *events, int eventcnt, int type)
{
int i;
for (i = 0; i < eventcnt; ++i)
ev_feed_event (loop, events [i], type);
}
static inline void
fd_event_nocheck (struct ev_loop *loop, int fd, int revents)
{
ANFD *anfd = ((loop)->anfds) + fd;
ev_io *w;
for (w = (ev_io *)anfd->head; w; w = (ev_io *)((WL)w)->next)
{
int ev = w->events & revents;
if (ev)
ev_feed_event (loop, (W)w, ev);
}
}
static inline void
fd_event (struct ev_loop *loop, int fd, int revents)
{
ANFD *anfd = ((loop)->anfds) + fd;
if (__builtin_expect ((!!(!anfd->reify)),(1)))
fd_event_nocheck (loop, fd, revents);
}
void
ev_feed_fd_event (struct ev_loop *loop, int fd, int revents) throw()
{
if (fd >= 0 && fd < ((loop)->anfdmax))
fd_event_nocheck (loop, fd, revents);
}
static inline void
fd_reify (struct ev_loop *loop)
{
int i;
# 1801 "ev.c"
for (i = 0; i < ((loop)->fdchangecnt); ++i)
{
int fd = ((loop)->fdchanges) [i];
ANFD *anfd = ((loop)->anfds) + fd;
ev_io *w;
unsigned char o_events = anfd->events;
unsigned char o_reify = anfd->reify;
anfd->reify = 0;
{
anfd->events = 0;
for (w = (ev_io *)anfd->head; w; w = (ev_io *)((WL)w)->next)
anfd->events |= (unsigned char)w->events;
if (o_events != anfd->events)
o_reify = EV__IOFDSET;
}
if (o_reify & EV__IOFDSET)
((loop)->backend_modify) (loop, fd, o_events, anfd->events);
}
((loop)->fdchangecnt) = 0;
}
static inline void
fd_change (struct ev_loop *loop, int fd, int flags)
{
unsigned char reify = ((loop)->anfds) [fd].reify;
((loop)->anfds) [fd].reify |= flags;
if (__builtin_expect ((!!(!reify)),(1)))
{
++((loop)->fdchangecnt);
if (__builtin_expect ((!!((((loop)->fdchangecnt)) > (((loop)->fdchangemax)))),(0))) { int __attribute__((__unused__)) ocur_ = (((loop)->fdchangemax)); (((loop)->fdchanges)) = (int *)array_realloc (sizeof (int), (((loop)->fdchanges)), &(((loop)->fdchangemax)), (((loop)->fdchangecnt))); ; };
((loop)->fdchanges) [((loop)->fdchangecnt) - 1] = fd;
}
}
static inline void __attribute__((__cold__))
fd_kill (struct ev_loop *loop, int fd)
{
ev_io *w;
while ((w = (ev_io *)((loop)->anfds) [fd].head))
{
ev_io_stop (loop, w);
ev_feed_event (loop, (W)w, EV_ERROR | EV_READ | EV_WRITE);
}
}
static inline int __attribute__((__cold__))
fd_valid (int fd)
{
return fcntl (fd, 1) != -1;
}
static void __attribute__((__noinline__)) __attribute__((__cold__))
fd_ebadf (struct ev_loop *loop)
{
int fd;
for (fd = 0; fd < ((loop)->anfdmax); ++fd)
if (((loop)->anfds) [fd].events)
if (!fd_valid (fd) && (*__errno_location ()) == 9)
fd_kill (loop, fd);
}
static void __attribute__((__noinline__)) __attribute__((__cold__))
fd_enomem (struct ev_loop *loop)
{
int fd;
for (fd = ((loop)->anfdmax); fd--; )
if (((loop)->anfds) [fd].events)
{
fd_kill (loop, fd);
break;
}
}
static void __attribute__((__noinline__))
fd_rearm_all (struct ev_loop *loop)
{
int fd;
for (fd = 0; fd < ((loop)->anfdmax); ++fd)
if (((loop)->anfds) [fd].events)
{
((loop)->anfds) [fd].events = 0;
((loop)->anfds) [fd].emask = 0;
fd_change (loop, fd, EV__IOFDSET | 1);
}
}
static inline void
fd_intern (int fd)
{
fcntl (fd, 2, 1);
fcntl (fd, 4, 04000);
}
# 1946 "ev.c"
static inline void
downheap (ANHE *heap, int N, int k)
{
ANHE he = heap [k];
ANHE *E = heap + N + (4 - 1);
for (;;)
{
ev_tstamp minat;
ANHE *minpos;
ANHE *pos = heap + 4 * (k - (4 - 1)) + (4 - 1) + 1;
if (__builtin_expect ((!!(pos + 4 - 1 < E)),(1)))
{
(minpos = pos + 0), (minat = (*minpos).at);
if ( (pos [1]).at < minat) (minpos = pos + 1), (minat = (*minpos).at);
if ( (pos [2]).at < minat) (minpos = pos + 2), (minat = (*minpos).at);
if ( (pos [3]).at < minat) (minpos = pos + 3), (minat = (*minpos).at);
}
else if (pos < E)
{
(minpos = pos + 0), (minat = (*minpos).at);
if (pos + 1 < E && (pos [1]).at < minat) (minpos = pos + 1), (minat = (*minpos).at);
if (pos + 2 < E && (pos [2]).at < minat) (minpos = pos + 2), (minat = (*minpos).at);
if (pos + 3 < E && (pos [3]).at < minat) (minpos = pos + 3), (minat = (*minpos).at);
}
else
break;
if ((he).at <= minat)
break;
heap [k] = *minpos;
((W)((*minpos).w))->active = k;
k = minpos - heap;
}
heap [k] = he;
((W)((he).w))->active = k;
}
# 2026 "ev.c"
static inline void
upheap (ANHE *heap, int k)
{
ANHE he = heap [k];
for (;;)
{
int p = ((((k) - (4 - 1) - 1) / 4) + (4 - 1));
if (((p) == (k)) || (heap [p]).at <= (he).at)
break;
heap [k] = heap [p];
((W)((heap [k]).w))->active = k;
k = p;
}
heap [k] = he;
((W)((he).w))->active = k;
}
static inline void
adjustheap (ANHE *heap, int N, int k)
{
if (k > (4 - 1) && (heap [k]).at <= (heap [((((k) - (4 - 1) - 1) / 4) + (4 - 1))]).at)
upheap (heap, k);
else
downheap (heap, N, k);
}
static inline void
reheap (ANHE *heap, int N)
{
int i;
for (i = 0; i < N; ++i)
upheap (heap, i + (4 - 1));
}
typedef struct
{
sig_atomic_t volatile pending;
struct ev_loop *loop;
WL head;
} ANSIG;
static ANSIG signals [(65) - 1];
static void __attribute__((__noinline__)) __attribute__((__cold__))
evpipe_init (struct ev_loop *loop)
{
if (!(0 + ((ev_watcher *)(void *)(&((loop)->pipe_w)))->active))
{
int fds [2];
fds [0] = -1;
fds [1] = eventfd (0, 04000 | 02000000);
if (fds [1] < 0 && (*__errno_location ()) == 22)
fds [1] = eventfd (0, 0);
if (fds [1] < 0)
{
while (pipe (fds))
ev_syserr ("(libev) error creating signal/async pipe");
fd_intern (fds [0]);
}
fd_intern (fds [1]);
((loop)->evpipe) [0] = fds [0];
if (((loop)->evpipe) [1] < 0)
((loop)->evpipe) [1] = fds [1];
else
{
dup2 (fds [1], ((loop)->evpipe) [1]);
close (fds [1]);
}
do { (&((loop)->pipe_w))->fd = (((loop)->evpipe) [0] < 0 ? ((loop)->evpipe) [1] : ((loop)->evpipe) [0]); (&((loop)->pipe_w))->events = (EV_READ) | EV__IOFDSET; } while (0);
ev_io_start (loop, &((loop)->pipe_w));
ev_unref (loop);
}
}
static inline void
evpipe_write (struct ev_loop *loop, sig_atomic_t volatile *flag)
{
__asm__ __volatile__ ("mfence" : : : "memory");
if (__builtin_expect ((!!(*flag)),(1)))
return;
*flag = 1;
__asm__ __volatile__ ("");
((loop)->pipe_write_skipped) = 1;
__asm__ __volatile__ ("mfence" : : : "memory");
if (((loop)->pipe_write_wanted))
{
int old_errno;
((loop)->pipe_write_skipped) = 0;
__asm__ __volatile__ ("");
old_errno = (*__errno_location ());
if (((loop)->evpipe) [0] < 0)
{
uint64_t counter = 1;
write (((loop)->evpipe) [1], &counter, sizeof (uint64_t));
}
else
{
write (((loop)->evpipe) [1], &(((loop)->evpipe) [1]), 1);
}
(*__errno_location ()) = old_errno;
}
}
static void
pipecb (struct ev_loop *loop, ev_io *iow, int revents)
{
int i;
if (revents & EV_READ)
{
if (((loop)->evpipe) [0] < 0)
{
uint64_t counter;
read (((loop)->evpipe) [1], &counter, sizeof (uint64_t));
}
else
{
char dummy[4];
# 2207 "ev.c"
read (((loop)->evpipe) [0], &dummy, sizeof (dummy));
}
}
((loop)->pipe_write_skipped) = 0;
__asm__ __volatile__ ("mfence" : : : "memory");
if (((loop)->sig_pending))
{
((loop)->sig_pending) = 0;
__asm__ __volatile__ ("mfence" : : : "memory");
for (i = (65) - 1; i--; )
if (__builtin_expect ((!!(signals [i].pending)),(0)))
ev_feed_signal_event (loop, i + 1);
}
if (((loop)->async_pending))
{
((loop)->async_pending) = 0;
__asm__ __volatile__ ("mfence" : : : "memory");
for (i = ((loop)->asynccnt); i--; )
if (((loop)->asyncs) [i]->sent)
{
((loop)->asyncs) [i]->sent = 0;
__asm__ __volatile__ ("");
ev_feed_event (loop, ((loop)->asyncs) [i], EV_ASYNC);
}
}
}
void
ev_feed_signal (int signum) throw()
{
struct ev_loop *loop;
__asm__ __volatile__ ("" : : : "memory");
loop = signals [signum - 1].loop;
if (!loop)
return;
signals [signum - 1].pending = 1;
evpipe_write (loop, &((loop)->sig_pending));
}
static void
ev_sighandler (int signum)
{
ev_feed_signal (signum);
}
void __attribute__((__noinline__))
ev_feed_signal_event (struct ev_loop *loop, int signum) throw()
{
WL w;
if (__builtin_expect ((!!(signum <= 0 || signum >= (65))),(0)))
return;
--signum;
if (__builtin_expect ((!!(signals [signum].loop != loop)),(0)))
return;
signals [signum].pending = 0;
__asm__ __volatile__ ("");
for (w = signals [signum].head; w; w = w->next)
ev_feed_event (loop, (W)w, EV_SIGNAL);
}
static void
sigfdcb (struct ev_loop *loop, ev_io *iow, int revents)
{
struct signalfd_siginfo si[2], *sip;
for (;;)
{
ssize_t res = read (((loop)->sigfd), si, sizeof (si));
for (sip = si; (char *)sip < (char *)si + res; ++sip)
ev_feed_signal_event (loop, sip->ssi_signo);
if (res < (ssize_t)sizeof (si))
break;
}
}
static WL childs [((0x7f) & 2) ? 16 : 1];
static ev_signal childev;
static inline void
child_reap (struct ev_loop *loop, int chain, int pid, int status)
{
ev_child *w;
int traced = ((((*(int *) &(status))) & 0xff) == 0x7f) || (((*(int *) &(status))) == 0xffff);
for (w = (ev_child *)childs [chain & ((((0x7f) & 2) ? 16 : 1) - 1)]; w; w = (ev_child *)((WL)w)->next)
{
if ((w->pid == pid || !w->pid)
&& (!traced || (w->flags & 1)))
{
( (ev_watcher *)(void *)(w))->priority = ((((0x7f) & 4) ? +2 : 0));
w->rpid = pid;
w->rstatus = status;
ev_feed_event (loop, (W)w, EV_CHILD);
}
}
}
static void
childcb (struct ev_loop *loop, ev_signal *sw, int revents)
{
int pid, status;
if (0 >= (pid = waitpid (-1, &status, 1 | 2 | 8)))
if (!8
|| (*__errno_location ()) != 22
|| 0 >= (pid = waitpid (-1, &status, 1 | 2)))
return;
ev_feed_event (loop, (W)sw, EV_SIGNAL);
child_reap (loop, pid, pid, status);
if ((((0x7f) & 2) ? 16 : 1) > 1)
child_reap (loop, 0, pid, status);
}
# 2393 "ev.c"
# 1 "ev_epoll.c" 1
# 66 "ev_epoll.c"
# 1 "/usr/include/sys/epoll.h" 1 3 4
# 26 "/usr/include/sys/epoll.h" 3 4
# 1 "/usr/include/bits/sigset.h" 1 3 4
# 27 "/usr/include/sys/epoll.h" 2 3 4
# 35 "/usr/include/sys/epoll.h" 3 4
enum
{
EPOLL_CLOEXEC = 02000000,
EPOLL_NONBLOCK = 04000
};
enum EPOLL_EVENTS
{
EPOLLIN = 0x001,
EPOLLPRI = 0x002,
EPOLLOUT = 0x004,
EPOLLRDNORM = 0x040,
EPOLLRDBAND = 0x080,
EPOLLWRNORM = 0x100,
EPOLLWRBAND = 0x200,
EPOLLMSG = 0x400,
EPOLLERR = 0x008,
EPOLLHUP = 0x010,
EPOLLRDHUP = 0x2000,
EPOLLONESHOT = (1 << 30),
EPOLLET = (1 << 31)
};
# 81 "/usr/include/sys/epoll.h" 3 4
typedef union epoll_data
{
void *ptr;
int fd;
uint32_t u32;
uint64_t u64;
} epoll_data_t;
struct epoll_event
{
uint32_t events;
epoll_data_t data;
} __attribute__ ((__packed__));
extern "C" {
extern int epoll_create (int __size) throw ();
extern int epoll_create1 (int __flags) throw ();
# 115 "/usr/include/sys/epoll.h" 3 4
extern int epoll_ctl (int __epfd, int __op, int __fd,
struct epoll_event *__event) throw ();
# 129 "/usr/include/sys/epoll.h" 3 4
extern int epoll_wait (int __epfd, struct epoll_event *__events,
int __maxevents, int __timeout);
extern int epoll_pwait (int __epfd, struct epoll_event *__events,
int __maxevents, int __timeout,
__const __sigset_t *__ss);
}
# 67 "ev_epoll.c" 2
static void
epoll_modify (struct ev_loop *loop, int fd, int oev, int nev)
{
struct epoll_event ev;
unsigned char oldmask;
# 84 "ev_epoll.c"
if (!nev)
return;
oldmask = ((loop)->anfds) [fd].emask;
((loop)->anfds) [fd].emask = nev;
ev.data.u64 = (uint64_t)(uint32_t)fd
| ((uint64_t)(uint32_t)++((loop)->anfds) [fd].egen << 32);
ev.events = (nev & EV_READ ? EPOLLIN : 0)
| (nev & EV_WRITE ? EPOLLOUT : 0);
if (__builtin_expect ((!!(!epoll_ctl (((loop)->backend_fd), oev && oldmask != nev ? 3 : 1, fd, &ev))),(1)))
return;
if (__builtin_expect ((!!((*__errno_location ()) == 2)),(1)))
{
if (!nev)
goto dec_egen;
if (!epoll_ctl (((loop)->backend_fd), 1, fd, &ev))
return;
}
else if (__builtin_expect ((!!((*__errno_location ()) == 17)),(1)))
{
if (oldmask == nev)
goto dec_egen;
if (!epoll_ctl (((loop)->backend_fd), 3, fd, &ev))
return;
}
else if (__builtin_expect ((!!((*__errno_location ()) == 1)),(1)))
{
((loop)->anfds) [fd].emask = 0x80;
if (!(oldmask & 0x80))
{
if (__builtin_expect ((!!((((loop)->epoll_epermcnt) + 1) > (((loop)->epoll_epermmax)))),(0))) { int __attribute__((__unused__)) ocur_ = (((loop)->epoll_epermmax)); (((loop)->epoll_eperms)) = (int *)array_realloc (sizeof (int), (((loop)->epoll_eperms)), &(((loop)->epoll_epermmax)), (((loop)->epoll_epermcnt) + 1)); ; };
((loop)->epoll_eperms) [((loop)->epoll_epermcnt)++] = fd;
}
return;
}
fd_kill (loop, fd);
dec_egen:
--((loop)->anfds) [fd].egen;
}
static void
epoll_poll (struct ev_loop *loop, ev_tstamp timeout)
{
int i;
int eventcnt;
if (__builtin_expect ((!!(((loop)->epoll_epermcnt))),(0)))
timeout = 0.;
if (__builtin_expect ((!!(((loop)->release_cb))),(0))) ((loop)->release_cb) (loop);
eventcnt = epoll_wait (((loop)->backend_fd), ((loop)->epoll_events), ((loop)->epoll_eventmax), timeout * 1e3);
if (__builtin_expect ((!!(((loop)->acquire_cb))),(0))) ((loop)->acquire_cb) (loop);
if (__builtin_expect ((!!(eventcnt < 0)),(0)))
{
if ((*__errno_location ()) != 4)
ev_syserr ("(libev) epoll_wait");
return;
}
for (i = 0; i < eventcnt; ++i)
{
struct epoll_event *ev = ((loop)->epoll_events) + i;
int fd = (uint32_t)ev->data.u64;
int want = ((loop)->anfds) [fd].events;
int got = (ev->events & (EPOLLOUT | EPOLLERR | EPOLLHUP) ? EV_WRITE : 0)
| (ev->events & (EPOLLIN | EPOLLERR | EPOLLHUP) ? EV_READ : 0);
if (__builtin_expect ((!!((uint32_t)((loop)->anfds) [fd].egen != (uint32_t)(ev->data.u64 >> 32))),(0)))
{
((loop)->postfork) = 1;
continue;
}
if (__builtin_expect ((!!(got & ~want)),(0)))
{
((loop)->anfds) [fd].emask = want;
# 199 "ev_epoll.c"
ev->events = (want & EV_READ ? EPOLLIN : 0)
| (want & EV_WRITE ? EPOLLOUT : 0);
if (epoll_ctl (((loop)->backend_fd), want ? 3 : 2, fd, ev))
{
((loop)->postfork) = 1;
continue;
}
}
fd_event (loop, fd, got);
}
if (__builtin_expect ((!!(eventcnt == ((loop)->epoll_eventmax))),(0)))
{
ev_realloc ((((loop)->epoll_events)), 0);
((loop)->epoll_eventmax) = array_nextsize (sizeof (struct epoll_event), ((loop)->epoll_eventmax), ((loop)->epoll_eventmax) + 1);
((loop)->epoll_events) = (struct epoll_event *)ev_realloc (0, (sizeof (struct epoll_event) * ((loop)->epoll_eventmax)));
}
for (i = ((loop)->epoll_epermcnt); i--; )
{
int fd = ((loop)->epoll_eperms) [i];
unsigned char events = ((loop)->anfds) [fd].events & (EV_READ | EV_WRITE);
if (((loop)->anfds) [fd].emask & 0x80 && events)
fd_event (loop, fd, events);
else
((loop)->epoll_eperms) [i] = ((loop)->epoll_eperms) [--((loop)->epoll_epermcnt)];
}
}
int static inline
epoll_init (struct ev_loop *loop, int flags)
{
((loop)->backend_fd) = epoll_create1 (EPOLL_CLOEXEC);
if (((loop)->backend_fd) < 0 && ((*__errno_location ()) == 22 || (*__errno_location ()) == 38))
((loop)->backend_fd) = epoll_create (256);
if (((loop)->backend_fd) < 0)
return 0;
fcntl (((loop)->backend_fd), 2, 1);
((loop)->backend_mintime) = 1e-3;
((loop)->backend_modify) = epoll_modify;
((loop)->backend_poll) = epoll_poll;
((loop)->epoll_eventmax) = 64;
((loop)->epoll_events) = (struct epoll_event *)ev_realloc (0, (sizeof (struct epoll_event) * ((loop)->epoll_eventmax)));
return EVBACKEND_EPOLL;
}
void static inline
epoll_destroy (struct ev_loop *loop)
{
ev_realloc ((((loop)->epoll_events)), 0);
ev_realloc ((((loop)->epoll_eperms)), 0); ((loop)->epoll_epermcnt) = ((loop)->epoll_epermmax) = 0; ((loop)->epoll_eperms) = 0;
}
void static inline
epoll_fork (struct ev_loop *loop)
{
close (((loop)->backend_fd));
while ((((loop)->backend_fd) = epoll_create (256)) < 0)
ev_syserr ("(libev) epoll_create");
fcntl (((loop)->backend_fd), 2, 1);
fd_rearm_all (loop);
}
# 2394 "ev.c" 2
# 1 "ev_poll.c" 1
# 40 "ev_poll.c"
# 1 "/usr/include/poll.h" 1 3 4
# 1 "/usr/include/sys/poll.h" 1 3 4
# 26 "/usr/include/sys/poll.h" 3 4
# 1 "/usr/include/bits/poll.h" 1 3 4
# 27 "/usr/include/sys/poll.h" 2 3 4
# 1 "/usr/include/bits/sigset.h" 1 3 4
# 30 "/usr/include/sys/poll.h" 2 3 4
typedef unsigned long int nfds_t;
struct pollfd
{
int fd;
short int events;
short int revents;
};
extern "C" {
# 58 "/usr/include/sys/poll.h" 3 4
extern int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout);
# 67 "/usr/include/sys/poll.h" 3 4
extern int ppoll (struct pollfd *__fds, nfds_t __nfds,
__const struct timespec *__timeout,
__const __sigset_t *__ss);
}
# 1 "/usr/include/poll.h" 2 3 4
# 41 "ev_poll.c" 2
void static inline
pollidx_init (int *base, int count)
{
while (count--)
*base++ = -1;
}
static void
poll_modify (struct ev_loop *loop, int fd, int oev, int nev)
{
int idx;
if (oev == nev)
return;
if (__builtin_expect ((!!((fd + 1) > (((loop)->pollidxmax)))),(0))) { int __attribute__((__unused__)) ocur_ = (((loop)->pollidxmax)); (((loop)->pollidxs)) = (int *)array_realloc (sizeof (int), (((loop)->pollidxs)), &(((loop)->pollidxmax)), (fd + 1)); pollidx_init ((((loop)->pollidxs)) + (ocur_), (((loop)->pollidxmax)) - ocur_); };
idx = ((loop)->pollidxs) [fd];
if (idx < 0)
{
((loop)->pollidxs) [fd] = idx = ((loop)->pollcnt)++;
if (__builtin_expect ((!!((((loop)->pollcnt)) > (((loop)->pollmax)))),(0))) { int __attribute__((__unused__)) ocur_ = (((loop)->pollmax)); (((loop)->polls)) = (struct pollfd *)array_realloc (sizeof (struct pollfd), (((loop)->polls)), &(((loop)->pollmax)), (((loop)->pollcnt))); ; };
((loop)->polls) [idx].fd = fd;
}
((((loop)->polls) [idx].fd == fd) ? static_cast<void> (0) : __assert_fail ("((loop)->polls) [idx].fd == fd", "ev_poll.c", 70, __PRETTY_FUNCTION__));
if (nev)
((loop)->polls) [idx].events =
(nev & EV_READ ? 0x001 : 0)
| (nev & EV_WRITE ? 0x004 : 0);
else
{
((loop)->pollidxs) [fd] = -1;
if (__builtin_expect ((!!(idx < --((loop)->pollcnt))),(1)))
{
((loop)->polls) [idx] = ((loop)->polls) [((loop)->pollcnt)];
((loop)->pollidxs) [((loop)->polls) [idx].fd] = idx;
}
}
}
static void
poll_poll (struct ev_loop *loop, ev_tstamp timeout)
{
struct pollfd *p;
int res;
if (__builtin_expect ((!!(((loop)->release_cb))),(0))) ((loop)->release_cb) (loop);
res = poll (((loop)->polls), ((loop)->pollcnt), timeout * 1e3);
if (__builtin_expect ((!!(((loop)->acquire_cb))),(0))) ((loop)->acquire_cb) (loop);
if (__builtin_expect ((!!(res < 0)),(0)))
{
if ((*__errno_location ()) == 9)
fd_ebadf (loop);
else if ((*__errno_location ()) == 12 && !syserr_cb)
fd_enomem (loop);
else if ((*__errno_location ()) != 4)
ev_syserr ("(libev) poll");
}
else
for (p = ((loop)->polls); res; ++p)
{
((("libev: poll() returned illegal result, broken BSD kernel?", p < ((loop)->polls) + ((loop)->pollcnt))) ? static_cast<void> (0) : __assert_fail ("(\"libev: poll() returned illegal result, broken BSD kernel?\", p < ((loop)->polls) + ((loop)->pollcnt))", "ev_poll.c", 110, __PRETTY_FUNCTION__));
if (__builtin_expect ((!!(p->revents)),(0)))
{
--res;
if (__builtin_expect ((!!(p->revents & 0x020)),(0)))
fd_kill (loop, p->fd);
else
fd_event (
loop,
p->fd,
(p->revents & (0x004 | 0x008 | 0x010) ? EV_WRITE : 0)
| (p->revents & (0x001 | 0x008 | 0x010) ? EV_READ : 0)
);
}
}
}
int static inline
poll_init (struct ev_loop *loop, int flags)
{
((loop)->backend_mintime) = 1e-3;
((loop)->backend_modify) = poll_modify;
((loop)->backend_poll) = poll_poll;
((loop)->pollidxs) = 0; ((loop)->pollidxmax) = 0;
((loop)->polls) = 0; ((loop)->pollmax) = 0; ((loop)->pollcnt) = 0;
return EVBACKEND_POLL;
}
void static inline
poll_destroy (struct ev_loop *loop)
{
ev_realloc ((((loop)->pollidxs)), 0);
ev_realloc ((((loop)->polls)), 0);
}
# 2397 "ev.c" 2
# 1 "ev_select.c" 1
# 70 "ev_select.c"
static void
select_modify (struct ev_loop *loop, int fd, int oev, int nev)
{
if (oev == nev)
return;
{
# 108 "ev_select.c"
int word = fd / (8 * (int) sizeof (__fd_mask));
fd_mask mask = 1UL << (fd % (8 * (int) sizeof (__fd_mask)));
if (__builtin_expect ((!!(((loop)->vec_max) <= word)),(0)))
{
int new_max = word + 1;
((loop)->vec_ri) = ev_realloc (((loop)->vec_ri), new_max * ((8 * (int) sizeof (__fd_mask)) / 8));
((loop)->vec_ro) = ev_realloc (((loop)->vec_ro), new_max * ((8 * (int) sizeof (__fd_mask)) / 8));
((loop)->vec_wi) = ev_realloc (((loop)->vec_wi), new_max * ((8 * (int) sizeof (__fd_mask)) / 8));
((loop)->vec_wo) = ev_realloc (((loop)->vec_wo), new_max * ((8 * (int) sizeof (__fd_mask)) / 8));
for (; ((loop)->vec_max) < new_max; ++((loop)->vec_max))
((fd_mask *)((loop)->vec_ri)) [((loop)->vec_max)] =
((fd_mask *)((loop)->vec_wi)) [((loop)->vec_max)] = 0;
}
((fd_mask *)((loop)->vec_ri)) [word] |= mask;
if (!(nev & EV_READ))
((fd_mask *)((loop)->vec_ri)) [word] &= ~mask;
((fd_mask *)((loop)->vec_wi)) [word] |= mask;
if (!(nev & EV_WRITE))
((fd_mask *)((loop)->vec_wi)) [word] &= ~mask;
}
}
static void
select_poll (struct ev_loop *loop, ev_tstamp timeout)
{
struct timeval tv;
int res;
int fd_setsize;
if (__builtin_expect ((!!(((loop)->release_cb))),(0))) ((loop)->release_cb) (loop);
do { tv.tv_sec = (long)timeout; tv.tv_usec = (long)((timeout - tv.tv_sec) * 1e6); } while (0);
fd_setsize = ((loop)->vec_max) * ((8 * (int) sizeof (__fd_mask)) / 8);
memcpy (((loop)->vec_ro), ((loop)->vec_ri), fd_setsize);
memcpy (((loop)->vec_wo), ((loop)->vec_wi), fd_setsize);
# 170 "ev_select.c"
res = select (((loop)->vec_max) * (8 * (int) sizeof (__fd_mask)), (fd_set *)((loop)->vec_ro), (fd_set *)((loop)->vec_wo), 0, &tv);
if (__builtin_expect ((!!(((loop)->acquire_cb))),(0))) ((loop)->acquire_cb) (loop);
if (__builtin_expect ((!!(res < 0)),(0)))
{
# 208 "ev_select.c"
if ((*__errno_location ()) == 9)
fd_ebadf (loop);
else if ((*__errno_location ()) == 12 && !syserr_cb)
fd_enomem (loop);
else if ((*__errno_location ()) != 4)
ev_syserr ("(libev) select");
return;
}
# 246 "ev_select.c"
{
int word, bit;
for (word = ((loop)->vec_max); word--; )
{
fd_mask word_r = ((fd_mask *)((loop)->vec_ro)) [word];
fd_mask word_w = ((fd_mask *)((loop)->vec_wo)) [word];
if (word_r || word_w)
for (bit = (8 * (int) sizeof (__fd_mask)); bit--; )
{
fd_mask mask = 1UL << bit;
int events = 0;
events |= word_r & mask ? EV_READ : 0;
events |= word_w & mask ? EV_WRITE : 0;
if (__builtin_expect ((!!(events)),(1)))
fd_event (loop, word * (8 * (int) sizeof (__fd_mask)) + bit, events);
}
}
}
}
int static inline
select_init (struct ev_loop *loop, int flags)
{
((loop)->backend_mintime) = 1e-6;
((loop)->backend_modify) = select_modify;
((loop)->backend_poll) = select_poll;
# 290 "ev_select.c"
((loop)->vec_max) = 0;
((loop)->vec_ri) = 0;
((loop)->vec_ro) = 0;
((loop)->vec_wi) = 0;
((loop)->vec_wo) = 0;
return EVBACKEND_SELECT;
}
void static inline
select_destroy (struct ev_loop *loop)
{
ev_realloc ((((loop)->vec_ri)), 0);
ev_realloc ((((loop)->vec_ro)), 0);
ev_realloc ((((loop)->vec_wi)), 0);
ev_realloc ((((loop)->vec_wo)), 0);
}
# 2400 "ev.c" 2
int __attribute__((__cold__))
ev_version_major (void) throw()
{
return 4;
}
int __attribute__((__cold__))
ev_version_minor (void) throw()
{
return 15;
}
int static inline __attribute__((__cold__))
enable_secure (void)
{
return getuid () != geteuid ()
|| getgid () != getegid ();
}
unsigned int __attribute__((__cold__))
ev_supported_backends (void) throw()
{
unsigned int flags = 0;
if (0 ) flags |= EVBACKEND_PORT;
if (0) flags |= EVBACKEND_KQUEUE;
if (((0x7f) & 32) ) flags |= EVBACKEND_EPOLL;
if (((0x7f) & 32) ) flags |= EVBACKEND_POLL;
if (((0x7f) & 32)) flags |= EVBACKEND_SELECT;
return flags;
}
unsigned int __attribute__((__cold__))
ev_recommended_backends (void) throw()
{
unsigned int flags = ev_supported_backends ();
flags &= ~EVBACKEND_KQUEUE;
# 2459 "ev.c"
return flags;
}
unsigned int __attribute__((__cold__))
ev_embeddable_backends (void) throw()
{
int flags = EVBACKEND_EPOLL | EVBACKEND_KQUEUE | EVBACKEND_PORT;
if (ev_linux_version () < 0x020620)
flags &= ~EVBACKEND_EPOLL;
return flags;
}
unsigned int
ev_backend (struct ev_loop *loop) throw()
{
return ((loop)->backend);
}
unsigned int
ev_iteration (struct ev_loop *loop) throw()
{
return ((loop)->loop_count);
}
unsigned int
ev_depth (struct ev_loop *loop) throw()
{
return ((loop)->loop_depth);
}
void
ev_set_io_collect_interval (struct ev_loop *loop, ev_tstamp interval) throw()
{
((loop)->io_blocktime) = interval;
}
void
ev_set_timeout_collect_interval (struct ev_loop *loop, ev_tstamp interval) throw()
{
((loop)->timeout_blocktime) = interval;
}
void
ev_set_userdata (struct ev_loop *loop, void *data) throw()
{
((loop)->userdata) = data;
}
void *
ev_userdata (struct ev_loop *loop) throw()
{
return ((loop)->userdata);
}
void
ev_set_invoke_pending_cb (struct ev_loop *loop, void (*invoke_pending_cb)(struct ev_loop *loop)) throw()
{
((loop)->invoke_cb) = invoke_pending_cb;
}
void
ev_set_loop_release_cb (struct ev_loop *loop, void (*release)(struct ev_loop *loop) throw(), void (*acquire)(struct ev_loop *loop) throw()) throw()
{
((loop)->release_cb) = release;
((loop)->acquire_cb) = acquire;
}
static void __attribute__((__noinline__)) __attribute__((__cold__))
loop_init (struct ev_loop *loop, unsigned int flags) throw()
{
if (!((loop)->backend))
{
((loop)->origflags) = flags;
# 2550 "ev.c"
if (!have_monotonic)
{
struct timespec ts;
if (!syscall (228, (1), (&ts)))
have_monotonic = 1;
}
if (flags & EVFLAG_FORKCHECK)
((loop)->curpid) = getpid ();
if (!(flags & EVFLAG_NOENV)
&& !enable_secure ()
&& getenv ("LIBEV_FLAGS"))
flags = atoi (getenv ("LIBEV_FLAGS"));
((loop)->ev_rt_now) = ev_time ();
((loop)->mn_now) = get_clock ();
((loop)->now_floor) = ((loop)->mn_now);
((loop)->rtmn_diff) = ((loop)->ev_rt_now) - ((loop)->mn_now);
((loop)->invoke_cb) = ev_invoke_pending;
((loop)->io_blocktime) = 0.;
((loop)->timeout_blocktime) = 0.;
((loop)->backend) = 0;
((loop)->backend_fd) = -1;
((loop)->sig_pending) = 0;
((loop)->async_pending) = 0;
((loop)->pipe_write_skipped) = 0;
((loop)->pipe_write_wanted) = 0;
((loop)->evpipe) [0] = -1;
((loop)->evpipe) [1] = -1;
((loop)->fs_fd) = flags & EVFLAG_NOINOTIFY ? -1 : -2;
((loop)->sigfd) = flags & EVFLAG_SIGNALFD ? -2 : -1;
if (!(flags & EVBACKEND_MASK))
flags |= ev_recommended_backends ();
# 2610 "ev.c"
if (!((loop)->backend) && (flags & EVBACKEND_EPOLL )) ((loop)->backend) = epoll_init (loop, flags);
if (!((loop)->backend) && (flags & EVBACKEND_POLL )) ((loop)->backend) = poll_init (loop, flags);
if (!((loop)->backend) && (flags & EVBACKEND_SELECT)) ((loop)->backend) = select_init (loop, flags);
do { do { ((ev_watcher *)(void *)((&((loop)->pending_w))))->active = ((ev_watcher *)(void *)((&((loop)->pending_w))))->pending = 0; ( (ev_watcher *)(void *)(((&((loop)->pending_w)))))->priority = (0); (((&((loop)->pending_w))))->cb = ((pendingcb)); } while (0); ; } while (0);
do { ((ev_watcher *)(void *)(&((loop)->pipe_w)))->active = ((ev_watcher *)(void *)(&((loop)->pipe_w)))->pending = 0; ( (ev_watcher *)(void *)((&((loop)->pipe_w))))->priority = (0); ((&((loop)->pipe_w)))->cb = (pipecb); } while (0);
( (ev_watcher *)(void *)(&((loop)->pipe_w)))->priority = ((((0x7f) & 4) ? +2 : 0));
}
}
void __attribute__((__cold__))
ev_loop_destroy (struct ev_loop *loop)
{
int i;
if (!loop)
return;
if (__builtin_expect ((!!(((loop)->cleanupcnt))),(0)))
{
queue_events (loop, (W *)((loop)->cleanups), ((loop)->cleanupcnt), EV_CLEANUP);
((loop)->invoke_cb) (loop);
}
if (ev_is_default_loop (loop) && (0 + ((ev_watcher *)(void *)(&childev))->active))
{
ev_ref (loop);
ev_signal_stop (loop, &childev);
}
if ((0 + ((ev_watcher *)(void *)(&((loop)->pipe_w)))->active))
{
if (((loop)->evpipe) [0] >= 0) close (((loop)->evpipe) [0]);
if (((loop)->evpipe) [1] >= 0) close (((loop)->evpipe) [1]);
}
if ((0 + ((ev_watcher *)(void *)(&((loop)->sigfd_w)))->active))
close (((loop)->sigfd));
if (((loop)->fs_fd) >= 0)
close (((loop)->fs_fd));
if (((loop)->backend_fd) >= 0)
close (((loop)->backend_fd));
# 2689 "ev.c"
if (((loop)->backend) == EVBACKEND_EPOLL ) epoll_destroy (loop);
if (((loop)->backend) == EVBACKEND_POLL ) poll_destroy (loop);
if (((loop)->backend) == EVBACKEND_SELECT) select_destroy (loop);
for (i = ((((0x7f) & 4) ? +2 : 0) - (((0x7f) & 4) ? -2 : 0) + 1); i--; )
{
ev_realloc ((((loop)->pendings) [i]), 0); ((loop)->pendingcnt) [i] = ((loop)->pendingmax) [i] = 0; ((loop)->pendings) [i] = 0;
ev_realloc ((((loop)->idles) [i]), 0); ((loop)->idlecnt) [i] = ((loop)->idlemax) [i] = 0; ((loop)->idles) [i] = 0;
}
ev_realloc ((((loop)->anfds)), 0); ((loop)->anfds) = 0; ((loop)->anfdmax) = 0;
ev_realloc ((((loop)->rfeeds)), 0); ((loop)->rfeedcnt) = ((loop)->rfeedmax) = 0; ((loop)->rfeeds) = 0;
ev_realloc ((((loop)->fdchanges)), 0); ((loop)->fdchangecnt) = ((loop)->fdchangemax) = 0; ((loop)->fdchanges) = 0;
ev_realloc ((((loop)->timers)), 0); ((loop)->timercnt) = ((loop)->timermax) = 0; ((loop)->timers) = 0;
ev_realloc ((((loop)->periodics)), 0); ((loop)->periodiccnt) = ((loop)->periodicmax) = 0; ((loop)->periodics) = 0;
ev_realloc ((((loop)->forks)), 0); ((loop)->forkcnt) = ((loop)->forkmax) = 0; ((loop)->forks) = 0;
ev_realloc ((((loop)->cleanups)), 0); ((loop)->cleanupcnt) = ((loop)->cleanupmax) = 0; ((loop)->cleanups) = 0;
ev_realloc ((((loop)->prepares)), 0); ((loop)->preparecnt) = ((loop)->preparemax) = 0; ((loop)->prepares) = 0;
ev_realloc ((((loop)->checks)), 0); ((loop)->checkcnt) = ((loop)->checkmax) = 0; ((loop)->checks) = 0;
ev_realloc ((((loop)->asyncs)), 0); ((loop)->asynccnt) = ((loop)->asyncmax) = 0; ((loop)->asyncs) = 0;
((loop)->backend) = 0;
if (ev_is_default_loop (loop))
ev_default_loop_ptr = 0;
else
ev_realloc ((loop), 0);
}
static inline void infy_fork (struct ev_loop *loop);
static inline void
loop_fork (struct ev_loop *loop)
{
if (((loop)->backend) == EVBACKEND_EPOLL ) epoll_fork (loop);
infy_fork (loop);
if ((0 + ((ev_watcher *)(void *)(&((loop)->pipe_w)))->active))
{
ev_ref (loop);
ev_io_stop (loop, &((loop)->pipe_w));
if (((loop)->evpipe) [0] >= 0)
close (((loop)->evpipe) [0]);
evpipe_init (loop);
ev_feed_event (loop, &((loop)->pipe_w), EV_CUSTOM);
}
((loop)->postfork) = 0;
}
struct ev_loop * __attribute__((__cold__))
ev_loop_new (unsigned int flags) throw()
{
struct ev_loop *loop = (struct ev_loop *)ev_realloc (0, (sizeof (struct ev_loop)));
memset (loop, 0, sizeof (struct ev_loop));
loop_init (loop, flags);
if (ev_backend (loop))
return loop;
ev_realloc ((loop), 0);
return 0;
}
static void __attribute__((__noinline__)) __attribute__((__cold__))
verify_watcher (struct ev_loop *loop, W w)
{
((("libev: watcher has invalid priority", (((W)w)->priority - (((0x7f) & 4) ? -2 : 0)) >= 0 && (((W)w)->priority - (((0x7f) & 4) ? -2 : 0)) < ((((0x7f) & 4) ? +2 : 0) - (((0x7f) & 4) ? -2 : 0) + 1))) ? static_cast<void> (0) : __assert_fail ("(\"libev: watcher has invalid priority\", (((W)w)->priority - (((0x7f) & 4) ? -2 : 0)) >= 0 && (((W)w)->priority - (((0x7f) & 4) ? -2 : 0)) < ((((0x7f) & 4) ? +2 : 0) - (((0x7f) & 4) ? -2 : 0) + 1))", "ev.c", 2802, __PRETTY_FUNCTION__));
if (w->pending)
((("libev: pending watcher not on pending queue", ((loop)->pendings) [(((W)w)->priority - (((0x7f) & 4) ? -2 : 0))][w->pending - 1].w == w)) ? static_cast<void> (0) : __assert_fail ("(\"libev: pending watcher not on pending queue\", ((loop)->pendings) [(((W)w)->priority - (((0x7f) & 4) ? -2 : 0))][w->pending - 1].w == w)", "ev.c", 2805, __PRETTY_FUNCTION__));
}
static void __attribute__((__noinline__)) __attribute__((__cold__))
verify_heap (struct ev_loop *loop, ANHE *heap, int N)
{
int i;
for (i = (4 - 1); i < N + (4 - 1); ++i)
{
((("libev: active index mismatch in heap", ((W)((heap [i]).w))->active == i)) ? static_cast<void> (0) : __assert_fail ("(\"libev: active index mismatch in heap\", ((W)((heap [i]).w))->active == i)", "ev.c", 2815, __PRETTY_FUNCTION__));
((("libev: heap condition violated", i == (4 - 1) || (heap [((((i) - (4 - 1) - 1) / 4) + (4 - 1))]).at <= (heap [i]).at)) ? static_cast<void> (0) : __assert_fail ("(\"libev: heap condition violated\", i == (4 - 1) || (heap [((((i) - (4 - 1) - 1) / 4) + (4 - 1))]).at <= (heap [i]).at)", "ev.c", 2816, __PRETTY_FUNCTION__));
((("libev: heap at cache mismatch", (heap [i]).at == ((WT)((heap [i]).w))->at)) ? static_cast<void> (0) : __assert_fail ("(\"libev: heap at cache mismatch\", (heap [i]).at == ((WT)((heap [i]).w))->at)", "ev.c", 2817, __PRETTY_FUNCTION__));
verify_watcher (loop, (W)(heap [i]).w);
}
}
static void __attribute__((__noinline__)) __attribute__((__cold__))
array_verify (struct ev_loop *loop, W *ws, int cnt)
{
while (cnt--)
{
((("libev: active index mismatch", ((W)(ws [cnt]))->active == cnt + 1)) ? static_cast<void> (0) : __assert_fail ("(\"libev: active index mismatch\", ((W)(ws [cnt]))->active == cnt + 1)", "ev.c", 2828, __PRETTY_FUNCTION__));
verify_watcher (loop, ws [cnt]);
}
}
void __attribute__((__cold__))
ev_verify (struct ev_loop *loop) throw()
{
int i;
WL w, w2;
((((loop)->activecnt) >= -1) ? static_cast<void> (0) : __assert_fail ("((loop)->activecnt) >= -1", "ev.c", 2842, __PRETTY_FUNCTION__));
((((loop)->fdchangemax) >= ((loop)->fdchangecnt)) ? static_cast<void> (0) : __assert_fail ("((loop)->fdchangemax) >= ((loop)->fdchangecnt)", "ev.c", 2844, __PRETTY_FUNCTION__));
for (i = 0; i < ((loop)->fdchangecnt); ++i)
((("libev: negative fd in fdchanges", ((loop)->fdchanges) [i] >= 0)) ? static_cast<void> (0) : __assert_fail ("(\"libev: negative fd in fdchanges\", ((loop)->fdchanges) [i] >= 0)", "ev.c", 2846, __PRETTY_FUNCTION__));
((((loop)->anfdmax) >= 0) ? static_cast<void> (0) : __assert_fail ("((loop)->anfdmax) >= 0", "ev.c", 2848, __PRETTY_FUNCTION__));
for (i = 0; i < ((loop)->anfdmax); ++i)
{
int j = 0;
for (w = w2 = ((loop)->anfds) [i].head; w; w = w->next)
{
verify_watcher (loop, (W)w);
if (j++ & 1)
{
((("libev: io watcher list contains a loop", w != w2)) ? static_cast<void> (0) : __assert_fail ("(\"libev: io watcher list contains a loop\", w != w2)", "ev.c", 2859, __PRETTY_FUNCTION__));
w2 = w2->next;
}
((("libev: inactive fd watcher on anfd list", ((W)(w))->active == 1)) ? static_cast<void> (0) : __assert_fail ("(\"libev: inactive fd watcher on anfd list\", ((W)(w))->active == 1)", "ev.c", 2863, __PRETTY_FUNCTION__));
((("libev: fd mismatch between watcher and anfd", ((ev_io *)w)->fd == i)) ? static_cast<void> (0) : __assert_fail ("(\"libev: fd mismatch between watcher and anfd\", ((ev_io *)w)->fd == i)", "ev.c", 2864, __PRETTY_FUNCTION__));
}
}
((((loop)->timermax) >= ((loop)->timercnt)) ? static_cast<void> (0) : __assert_fail ("((loop)->timermax) >= ((loop)->timercnt)", "ev.c", 2868, __PRETTY_FUNCTION__));
verify_heap (loop, ((loop)->timers), ((loop)->timercnt));
((((loop)->periodicmax) >= ((loop)->periodiccnt)) ? static_cast<void> (0) : __assert_fail ("((loop)->periodicmax) >= ((loop)->periodiccnt)", "ev.c", 2872, __PRETTY_FUNCTION__));
verify_heap (loop, ((loop)->periodics), ((loop)->periodiccnt));
for (i = ((((0x7f) & 4) ? +2 : 0) - (((0x7f) & 4) ? -2 : 0) + 1); i--; )
{
((((loop)->pendingmax) [i] >= ((loop)->pendingcnt) [i]) ? static_cast<void> (0) : __assert_fail ("((loop)->pendingmax) [i] >= ((loop)->pendingcnt) [i]", "ev.c", 2878, __PRETTY_FUNCTION__));
((((loop)->idleall) >= 0) ? static_cast<void> (0) : __assert_fail ("((loop)->idleall) >= 0", "ev.c", 2880, __PRETTY_FUNCTION__));
((((loop)->idlemax) [i] >= ((loop)->idlecnt) [i]) ? static_cast<void> (0) : __assert_fail ("((loop)->idlemax) [i] >= ((loop)->idlecnt) [i]", "ev.c", 2881, __PRETTY_FUNCTION__));
array_verify (loop, (W *)((loop)->idles) [i], ((loop)->idlecnt) [i]);
}
((((loop)->forkmax) >= ((loop)->forkcnt)) ? static_cast<void> (0) : __assert_fail ("((loop)->forkmax) >= ((loop)->forkcnt)", "ev.c", 2887, __PRETTY_FUNCTION__));
array_verify (loop, (W *)((loop)->forks), ((loop)->forkcnt));
((((loop)->cleanupmax) >= ((loop)->cleanupcnt)) ? static_cast<void> (0) : __assert_fail ("((loop)->cleanupmax) >= ((loop)->cleanupcnt)", "ev.c", 2892, __PRETTY_FUNCTION__));
array_verify (loop, (W *)((loop)->cleanups), ((loop)->cleanupcnt));
((((loop)->asyncmax) >= ((loop)->asynccnt)) ? static_cast<void> (0) : __assert_fail ("((loop)->asyncmax) >= ((loop)->asynccnt)", "ev.c", 2897, __PRETTY_FUNCTION__));
array_verify (loop, (W *)((loop)->asyncs), ((loop)->asynccnt));
((((loop)->preparemax) >= ((loop)->preparecnt)) ? static_cast<void> (0) : __assert_fail ("((loop)->preparemax) >= ((loop)->preparecnt)", "ev.c", 2902, __PRETTY_FUNCTION__));
array_verify (loop, (W *)((loop)->prepares), ((loop)->preparecnt));
((((loop)->checkmax) >= ((loop)->checkcnt)) ? static_cast<void> (0) : __assert_fail ("((loop)->checkmax) >= ((loop)->checkcnt)", "ev.c", 2907, __PRETTY_FUNCTION__));
array_verify (loop, (W *)((loop)->checks), ((loop)->checkcnt));
# 2918 "ev.c"
}
struct ev_loop * __attribute__((__cold__))
ev_default_loop (unsigned int flags) throw()
{
if (!ev_default_loop_ptr)
{
struct ev_loop *loop = ev_default_loop_ptr = &default_loop_struct;
loop_init (loop, flags);
if (ev_backend (loop))
{
do { do { ((ev_watcher *)(void *)((&childev)))->active = ((ev_watcher *)(void *)((&childev)))->pending = 0; ( (ev_watcher *)(void *)(((&childev))))->priority = (0); (((&childev)))->cb = ((childcb)); } while (0); do { ((&childev))->signum = ((17)); } while (0); } while (0);
( (ev_watcher *)(void *)(&childev))->priority = ((((0x7f) & 4) ? +2 : 0));
ev_signal_start (loop, &childev);
ev_unref (loop);
}
else
ev_default_loop_ptr = 0;
}
return ev_default_loop_ptr;
}
void
ev_loop_fork (struct ev_loop *loop) throw()
{
((loop)->postfork) = 1;
}
void
ev_invoke (struct ev_loop *loop, void *w, int revents)
{
((W)w)->cb (loop, ((W)w), (revents));
}
unsigned int
ev_pending_count (struct ev_loop *loop) throw()
{
int pri;
unsigned int count = 0;
for (pri = ((((0x7f) & 4) ? +2 : 0) - (((0x7f) & 4) ? -2 : 0) + 1); pri--; )
count += ((loop)->pendingcnt) [pri];
return count;
}
void __attribute__((__noinline__))
ev_invoke_pending (struct ev_loop *loop)
{
((loop)->pendingpri) = ((((0x7f) & 4) ? +2 : 0) - (((0x7f) & 4) ? -2 : 0) + 1);
while (((loop)->pendingpri))
{
--((loop)->pendingpri);
while (((loop)->pendingcnt) [((loop)->pendingpri)])
{
ANPENDING *p = ((loop)->pendings) [((loop)->pendingpri)] + --((loop)->pendingcnt) [((loop)->pendingpri)];
p->w->pending = 0;
(p->w)->cb (loop, (p->w), (p->events));
do { } while (0);
}
}
}
static inline void
idle_reify (struct ev_loop *loop)
{
if (__builtin_expect ((!!(((loop)->idleall))),(0)))
{
int pri;
for (pri = ((((0x7f) & 4) ? +2 : 0) - (((0x7f) & 4) ? -2 : 0) + 1); pri--; )
{
if (((loop)->pendingcnt) [pri])
break;
if (((loop)->idlecnt) [pri])
{
queue_events (loop, (W *)((loop)->idles) [pri], ((loop)->idlecnt) [pri], EV_IDLE);
break;
}
}
}
}
static inline void
timers_reify (struct ev_loop *loop)
{
do { } while (0);
if (((loop)->timercnt) && (((loop)->timers) [(4 - 1)]).at < ((loop)->mn_now))
{
do
{
ev_timer *w = (ev_timer *)(((loop)->timers) [(4 - 1)]).w;
if (w->repeat)
{
((WT)(w))->at += w->repeat;
if (((WT)(w))->at < ((loop)->mn_now))
((WT)(w))->at = ((loop)->mn_now);
((("libev: negative ev_timer repeat value found while processing timers", w->repeat > 0.)) ? static_cast<void> (0) : __assert_fail ("(\"libev: negative ev_timer repeat value found while processing timers\", w->repeat > 0.)", "ev.c", 3046, __PRETTY_FUNCTION__));
(((loop)->timers) [(4 - 1)]).at = (((loop)->timers) [(4 - 1)]).w->at;
downheap (((loop)->timers), ((loop)->timercnt), (4 - 1));
}
else
ev_timer_stop (loop, w);
do { } while (0);
feed_reverse (loop, (W)w);
}
while (((loop)->timercnt) && (((loop)->timers) [(4 - 1)]).at < ((loop)->mn_now));
feed_reverse_done (loop, EV_TIMER);
}
}
static void __attribute__((__noinline__))
periodic_recalc (struct ev_loop *loop, ev_periodic *w)
{
ev_tstamp interval = w->interval > 0.0001220703125 ? w->interval : 0.0001220703125;
ev_tstamp at = w->offset + interval * floor ((((loop)->ev_rt_now) - w->offset) / interval);
while (at <= ((loop)->ev_rt_now))
{
ev_tstamp nat = at + w->interval;
if (__builtin_expect ((!!(nat == at)),(0)))
{
at = ((loop)->ev_rt_now);
break;
}
at = nat;
}
((WT)(w))->at = at;
}
static inline void
periodics_reify (struct ev_loop *loop)
{
do { } while (0);
while (((loop)->periodiccnt) && (((loop)->periodics) [(4 - 1)]).at < ((loop)->ev_rt_now))
{
do
{
ev_periodic *w = (ev_periodic *)(((loop)->periodics) [(4 - 1)]).w;
if (w->reschedule_cb)
{
((WT)(w))->at = w->reschedule_cb (w, ((loop)->ev_rt_now));
((("libev: ev_periodic reschedule callback returned time in the past", ((WT)(w))->at >= ((loop)->ev_rt_now))) ? static_cast<void> (0) : __assert_fail ("(\"libev: ev_periodic reschedule callback returned time in the past\", ((WT)(w))->at >= ((loop)->ev_rt_now))", "ev.c", 3108, __PRETTY_FUNCTION__));
(((loop)->periodics) [(4 - 1)]).at = (((loop)->periodics) [(4 - 1)]).w->at;
downheap (((loop)->periodics), ((loop)->periodiccnt), (4 - 1));
}
else if (w->interval)
{
periodic_recalc (loop, w);
(((loop)->periodics) [(4 - 1)]).at = (((loop)->periodics) [(4 - 1)]).w->at;
downheap (((loop)->periodics), ((loop)->periodiccnt), (4 - 1));
}
else
ev_periodic_stop (loop, w);
do { } while (0);
feed_reverse (loop, (W)w);
}
while (((loop)->periodiccnt) && (((loop)->periodics) [(4 - 1)]).at < ((loop)->ev_rt_now));
feed_reverse_done (loop, EV_PERIODIC);
}
}
static void __attribute__((__noinline__)) __attribute__((__cold__))
periodics_reschedule (struct ev_loop *loop)
{
int i;
for (i = (4 - 1); i < ((loop)->periodiccnt) + (4 - 1); ++i)
{
ev_periodic *w = (ev_periodic *)(((loop)->periodics) [i]).w;
if (w->reschedule_cb)
((WT)(w))->at = w->reschedule_cb (w, ((loop)->ev_rt_now));
else if (w->interval)
periodic_recalc (loop, w);
(((loop)->periodics) [i]).at = (((loop)->periodics) [i]).w->at;
}
reheap (((loop)->periodics), ((loop)->periodiccnt));
}
static void __attribute__((__noinline__)) __attribute__((__cold__))
timers_reschedule (struct ev_loop *loop, ev_tstamp adjust)
{
int i;
for (i = 0; i < ((loop)->timercnt); ++i)
{
ANHE *he = ((loop)->timers) + i + (4 - 1);
(*he).w->at += adjust;
(*he).at = (*he).w->at;
}
}
static inline void
time_update (struct ev_loop *loop, ev_tstamp max_block)
{
if (__builtin_expect ((!!(have_monotonic)),(1)))
{
int i;
ev_tstamp odiff = ((loop)->rtmn_diff);
((loop)->mn_now) = get_clock ();
if (__builtin_expect ((!!(((loop)->mn_now) - ((loop)->now_floor) < 1. * .5)),(1)))
{
((loop)->ev_rt_now) = ((loop)->rtmn_diff) + ((loop)->mn_now);
return;
}
((loop)->now_floor) = ((loop)->mn_now);
((loop)->ev_rt_now) = ev_time ();
# 3201 "ev.c"
for (i = 4; --i; )
{
ev_tstamp diff;
((loop)->rtmn_diff) = ((loop)->ev_rt_now) - ((loop)->mn_now);
diff = odiff - ((loop)->rtmn_diff);
if (__builtin_expect ((!!((diff < 0. ? -diff : diff) < 1.)),(1)))
return;
((loop)->ev_rt_now) = ev_time ();
((loop)->mn_now) = get_clock ();
((loop)->now_floor) = ((loop)->mn_now);
}
periodics_reschedule (loop);
}
else
{
((loop)->ev_rt_now) = ev_time ();
if (__builtin_expect ((!!(((loop)->mn_now) > ((loop)->ev_rt_now) || ((loop)->ev_rt_now) > ((loop)->mn_now) + max_block + 1.)),(0)))
{
timers_reschedule (loop, ((loop)->ev_rt_now) - ((loop)->mn_now));
periodics_reschedule (loop);
}
((loop)->mn_now) = ((loop)->ev_rt_now);
}
}
int
ev_run (struct ev_loop *loop, int flags)
{
++((loop)->loop_depth);
((("libev: ev_loop recursion during release detected", ((loop)->loop_done) != 0x80)) ? static_cast<void> (0) : __assert_fail ("(\"libev: ev_loop recursion during release detected\", ((loop)->loop_done) != 0x80)", "ev.c", 3247, __PRETTY_FUNCTION__));
((loop)->loop_done) = EVBREAK_CANCEL;
((loop)->invoke_cb) (loop);
do
{
if (__builtin_expect ((!!(((loop)->curpid))),(0)))
if (__builtin_expect ((!!(getpid () != ((loop)->curpid))),(0)))
{
((loop)->curpid) = getpid ();
((loop)->postfork) = 1;
}
if (__builtin_expect ((!!(((loop)->postfork))),(0)))
if (((loop)->forkcnt))
{
queue_events (loop, (W *)((loop)->forks), ((loop)->forkcnt), EV_FORK);
((loop)->invoke_cb) (loop);
}
if (__builtin_expect ((!!(((loop)->preparecnt))),(0)))
{
queue_events (loop, (W *)((loop)->prepares), ((loop)->preparecnt), EV_PREPARE);
((loop)->invoke_cb) (loop);
}
if (__builtin_expect ((!!(((loop)->loop_done))),(0)))
break;
if (__builtin_expect ((!!(((loop)->postfork))),(0)))
loop_fork (loop);
fd_reify (loop);
{
ev_tstamp waittime = 0.;
ev_tstamp sleeptime = 0.;
ev_tstamp prev_mn_now = ((loop)->mn_now);
time_update (loop, 1e100);
((loop)->pipe_write_wanted) = 1;
__asm__ __volatile__ ("mfence" : : : "memory");
if (__builtin_expect ((!!(!(flags & EVRUN_NOWAIT || ((loop)->idleall) || !((loop)->activecnt) || ((loop)->pipe_write_skipped)))),(1)))
{
waittime = 59.743;
if (((loop)->timercnt))
{
ev_tstamp to = (((loop)->timers) [(4 - 1)]).at - ((loop)->mn_now);
if (waittime > to) waittime = to;
}
if (((loop)->periodiccnt))
{
ev_tstamp to = (((loop)->periodics) [(4 - 1)]).at - ((loop)->ev_rt_now);
if (waittime > to) waittime = to;
}
if (__builtin_expect ((!!(waittime < ((loop)->timeout_blocktime))),(0)))
waittime = ((loop)->timeout_blocktime);
if (__builtin_expect ((!!(waittime < ((loop)->backend_mintime))),(0)))
waittime = ((loop)->backend_mintime);
if (__builtin_expect ((!!(((loop)->io_blocktime))),(0)))
{
sleeptime = ((loop)->io_blocktime) - (((loop)->mn_now) - prev_mn_now);
if (sleeptime > waittime - ((loop)->backend_mintime))
sleeptime = waittime - ((loop)->backend_mintime);
if (__builtin_expect ((!!(sleeptime > 0.)),(1)))
{
ev_sleep (sleeptime);
waittime -= sleeptime;
}
}
}
++((loop)->loop_count);
(((((loop)->loop_done) = 0x80, 1)) ? static_cast<void> (0) : __assert_fail ("(((loop)->loop_done) = 0x80, 1)", "ev.c", 3359, __PRETTY_FUNCTION__));
((loop)->backend_poll) (loop, waittime);
(((((loop)->loop_done) = EVBREAK_CANCEL, 1)) ? static_cast<void> (0) : __assert_fail ("(((loop)->loop_done) = EVBREAK_CANCEL, 1)", "ev.c", 3361, __PRETTY_FUNCTION__));
((loop)->pipe_write_wanted) = 0;
__asm__ __volatile__ ("" : : : "memory");
if (((loop)->pipe_write_skipped))
{
((("libev: pipe_w not active, but pipe not written", (0 + ((ev_watcher *)(void *)(&((loop)->pipe_w)))->active))) ? static_cast<void> (0) : __assert_fail ("(\"libev: pipe_w not active, but pipe not written\", (0 + ((ev_watcher *)(void *)(&((loop)->pipe_w)))->active))", "ev.c", 3368, __PRETTY_FUNCTION__));
ev_feed_event (loop, &((loop)->pipe_w), EV_CUSTOM);
}
time_update (loop, waittime + sleeptime);
}
timers_reify (loop);
periodics_reify (loop);
idle_reify (loop);
if (__builtin_expect ((!!(((loop)->checkcnt))),(0)))
queue_events (loop, (W *)((loop)->checks), ((loop)->checkcnt), EV_CHECK);
((loop)->invoke_cb) (loop);
}
while (__builtin_expect ((!!(((loop)->activecnt) && !((loop)->loop_done) && !(flags & (EVRUN_ONCE | EVRUN_NOWAIT)))),(1))
);
if (((loop)->loop_done) == EVBREAK_ONE)
((loop)->loop_done) = EVBREAK_CANCEL;
--((loop)->loop_depth);
return ((loop)->activecnt);
}
void
ev_break (struct ev_loop *loop, int how) throw()
{
((loop)->loop_done) = how;
}
void
ev_ref (struct ev_loop *loop) throw()
{
++((loop)->activecnt);
}
void
ev_unref (struct ev_loop *loop) throw()
{
--((loop)->activecnt);
}
void
ev_now_update (struct ev_loop *loop) throw()
{
time_update (loop, 1e100);
}
void
ev_suspend (struct ev_loop *loop) throw()
{
ev_now_update (loop);
}
void
ev_resume (struct ev_loop *loop) throw()
{
ev_tstamp mn_prev = ((loop)->mn_now);
ev_now_update (loop);
timers_reschedule (loop, ((loop)->mn_now) - mn_prev);
periodics_reschedule (loop);
}
static inline void
wlist_add (WL *head, WL elem)
{
elem->next = *head;
*head = elem;
}
static inline void
wlist_del (WL *head, WL elem)
{
while (*head)
{
if (__builtin_expect ((!!(*head == elem)),(1)))
{
*head = elem->next;
break;
}
head = &(*head)->next;
}
}
static inline void
clear_pending (struct ev_loop *loop, W w)
{
if (w->pending)
{
((loop)->pendings) [(((W)w)->priority - (((0x7f) & 4) ? -2 : 0))][w->pending - 1].w = (W)&((loop)->pending_w);
w->pending = 0;
}
}
int
ev_clear_pending (struct ev_loop *loop, void *w) throw()
{
W w_ = (W)w;
int pending = w_->pending;
if (__builtin_expect ((!!(pending)),(1)))
{
ANPENDING *p = ((loop)->pendings) [(((W)w_)->priority - (((0x7f) & 4) ? -2 : 0))] + pending - 1;
p->w = (W)&((loop)->pending_w);
w_->pending = 0;
return p->events;
}
else
return 0;
}
static inline void
pri_adjust (struct ev_loop *loop, W w)
{
int pri = (+(((ev_watcher *)(void *)(w))->priority));
pri = pri < (((0x7f) & 4) ? -2 : 0) ? (((0x7f) & 4) ? -2 : 0) : pri;
pri = pri > (((0x7f) & 4) ? +2 : 0) ? (((0x7f) & 4) ? +2 : 0) : pri;
( (ev_watcher *)(void *)(w))->priority = (pri);
}
static inline void
ev_start (struct ev_loop *loop, W w, int active)
{
pri_adjust (loop, w);
w->active = active;
ev_ref (loop);
}
static inline void
ev_stop (struct ev_loop *loop, W w)
{
ev_unref (loop);
w->active = 0;
}
void __attribute__((__noinline__))
ev_io_start (struct ev_loop *loop, ev_io *w) throw()
{
int fd = w->fd;
if (__builtin_expect ((!!((0 + ((ev_watcher *)(void *)(w))->active))),(0)))
return;
((("libev: ev_io_start called with negative fd", fd >= 0)) ? static_cast<void> (0) : __assert_fail ("(\"libev: ev_io_start called with negative fd\", fd >= 0)", "ev.c", 3542, __PRETTY_FUNCTION__));
((("libev: ev_io_start called with illegal event mask", !(w->events & ~(EV__IOFDSET | EV_READ | EV_WRITE)))) ? static_cast<void> (0) : __assert_fail ("(\"libev: ev_io_start called with illegal event mask\", !(w->events & ~(EV__IOFDSET | EV_READ | EV_WRITE)))", "ev.c", 3543, __PRETTY_FUNCTION__));
do { } while (0);
ev_start (loop, (W)w, 1);
if (__builtin_expect ((!!((fd + 1) > (((loop)->anfdmax)))),(0))) { int __attribute__((__unused__)) ocur_ = (((loop)->anfdmax)); (((loop)->anfds)) = (ANFD *)array_realloc (sizeof (ANFD), (((loop)->anfds)), &(((loop)->anfdmax)), (fd + 1)); memset ((void *)((((loop)->anfds)) + (ocur_)), 0, sizeof (*((((loop)->anfds)) + (ocur_))) * ((((loop)->anfdmax)) - ocur_)); };
wlist_add (&((loop)->anfds)[fd].head, (WL)w);
((("libev: ev_io_start called with corrupted watcher", ((WL)w)->next != (WL)w)) ? static_cast<void> (0) : __assert_fail ("(\"libev: ev_io_start called with corrupted watcher\", ((WL)w)->next != (WL)w)", "ev.c", 3552, __PRETTY_FUNCTION__));
fd_change (loop, fd, w->events & EV__IOFDSET | 1);
w->events &= ~EV__IOFDSET;
do { } while (0);
}
void __attribute__((__noinline__))
ev_io_stop (struct ev_loop *loop, ev_io *w) throw()
{
clear_pending (loop, (W)w);
if (__builtin_expect ((!!(!(0 + ((ev_watcher *)(void *)(w))->active))),(0)))
return;
((("libev: ev_io_stop called with illegal fd (must stay constant after start!)", w->fd >= 0 && w->fd < ((loop)->anfdmax))) ? static_cast<void> (0) : __assert_fail ("(\"libev: ev_io_stop called with illegal fd (must stay constant after start!)\", w->fd >= 0 && w->fd < ((loop)->anfdmax))", "ev.c", 3567, __PRETTY_FUNCTION__));
do { } while (0);
wlist_del (&((loop)->anfds)[w->fd].head, (WL)w);
ev_stop (loop, (W)w);
fd_change (loop, w->fd, 1);
do { } while (0);
}
void __attribute__((__noinline__))
ev_timer_start (struct ev_loop *loop, ev_timer *w) throw()
{
if (__builtin_expect ((!!((0 + ((ev_watcher *)(void *)(w))->active))),(0)))
return;
((WT)(w))->at += ((loop)->mn_now);
((("libev: ev_timer_start called with negative timer repeat value", w->repeat >= 0.)) ? static_cast<void> (0) : __assert_fail ("(\"libev: ev_timer_start called with negative timer repeat value\", w->repeat >= 0.)", "ev.c", 3587, __PRETTY_FUNCTION__));
do { } while (0);
++((loop)->timercnt);
ev_start (loop, (W)w, ((loop)->timercnt) + (4 - 1) - 1);
if (__builtin_expect ((!!((((W)(w))->active + 1) > (((loop)->timermax)))),(0))) { int __attribute__((__unused__)) ocur_ = (((loop)->timermax)); (((loop)->timers)) = (ANHE *)array_realloc (sizeof (ANHE), (((loop)->timers)), &(((loop)->timermax)), (((W)(w))->active + 1)); ; };
(((loop)->timers) [((W)(w))->active]).w = (WT)w;
(((loop)->timers) [((W)(w))->active]).at = (((loop)->timers) [((W)(w))->active]).w->at;
upheap (((loop)->timers), ((W)(w))->active);
do { } while (0);
}
void __attribute__((__noinline__))
ev_timer_stop (struct ev_loop *loop, ev_timer *w) throw()
{
clear_pending (loop, (W)w);
if (__builtin_expect ((!!(!(0 + ((ev_watcher *)(void *)(w))->active))),(0)))
return;
do { } while (0);
{
int active = ((W)(w))->active;
((("libev: internal timer heap corruption", (((loop)->timers) [active]).w == (WT)w)) ? static_cast<void> (0) : __assert_fail ("(\"libev: internal timer heap corruption\", (((loop)->timers) [active]).w == (WT)w)", "ev.c", 3615, __PRETTY_FUNCTION__));
--((loop)->timercnt);
if (__builtin_expect ((!!(active < ((loop)->timercnt) + (4 - 1))),(1)))
{
((loop)->timers) [active] = ((loop)->timers) [((loop)->timercnt) + (4 - 1)];
adjustheap (((loop)->timers), ((loop)->timercnt), active);
}
}
((WT)(w))->at -= ((loop)->mn_now);
ev_stop (loop, (W)w);
do { } while (0);
}
void __attribute__((__noinline__))
ev_timer_again (struct ev_loop *loop, ev_timer *w) throw()
{
do { } while (0);
clear_pending (loop, (W)w);
if ((0 + ((ev_watcher *)(void *)(w))->active))
{
if (w->repeat)
{
((WT)(w))->at = ((loop)->mn_now) + w->repeat;
(((loop)->timers) [((W)(w))->active]).at = (((loop)->timers) [((W)(w))->active]).w->at;
adjustheap (((loop)->timers), ((loop)->timercnt), ((W)(w))->active);
}
else
ev_timer_stop (loop, w);
}
else if (w->repeat)
{
((WT)(w))->at = w->repeat;
ev_timer_start (loop, w);
}
do { } while (0);
}
ev_tstamp
ev_timer_remaining (struct ev_loop *loop, ev_timer *w) throw()
{
return ((WT)(w))->at - ((0 + ((ev_watcher *)(void *)(w))->active) ? ((loop)->mn_now) : 0.);
}
void __attribute__((__noinline__))
ev_periodic_start (struct ev_loop *loop, ev_periodic *w) throw()
{
if (__builtin_expect ((!!((0 + ((ev_watcher *)(void *)(w))->active))),(0)))
return;
if (w->reschedule_cb)
((WT)(w))->at = w->reschedule_cb (w, ((loop)->ev_rt_now));
else if (w->interval)
{
((("libev: ev_periodic_start called with negative interval value", w->interval >= 0.)) ? static_cast<void> (0) : __assert_fail ("(\"libev: ev_periodic_start called with negative interval value\", w->interval >= 0.)", "ev.c", 3677, __PRETTY_FUNCTION__));
periodic_recalc (loop, w);
}
else
((WT)(w))->at = w->offset;
do { } while (0);
++((loop)->periodiccnt);
ev_start (loop, (W)w, ((loop)->periodiccnt) + (4 - 1) - 1);
if (__builtin_expect ((!!((((W)(w))->active + 1) > (((loop)->periodicmax)))),(0))) { int __attribute__((__unused__)) ocur_ = (((loop)->periodicmax)); (((loop)->periodics)) = (ANHE *)array_realloc (sizeof (ANHE), (((loop)->periodics)), &(((loop)->periodicmax)), (((W)(w))->active + 1)); ; };
(((loop)->periodics) [((W)(w))->active]).w = (WT)w;
(((loop)->periodics) [((W)(w))->active]).at = (((loop)->periodics) [((W)(w))->active]).w->at;
upheap (((loop)->periodics), ((W)(w))->active);
do { } while (0);
}
void __attribute__((__noinline__))
ev_periodic_stop (struct ev_loop *loop, ev_periodic *w) throw()
{
clear_pending (loop, (W)w);
if (__builtin_expect ((!!(!(0 + ((ev_watcher *)(void *)(w))->active))),(0)))
return;
do { } while (0);
{
int active = ((W)(w))->active;
((("libev: internal periodic heap corruption", (((loop)->periodics) [active]).w == (WT)w)) ? static_cast<void> (0) : __assert_fail ("(\"libev: internal periodic heap corruption\", (((loop)->periodics) [active]).w == (WT)w)", "ev.c", 3709, __PRETTY_FUNCTION__));
--((loop)->periodiccnt);
if (__builtin_expect ((!!(active < ((loop)->periodiccnt) + (4 - 1))),(1)))
{
((loop)->periodics) [active] = ((loop)->periodics) [((loop)->periodiccnt) + (4 - 1)];
adjustheap (((loop)->periodics), ((loop)->periodiccnt), active);
}
}
ev_stop (loop, (W)w);
do { } while (0);
}
void __attribute__((__noinline__))
ev_periodic_again (struct ev_loop *loop, ev_periodic *w) throw()
{
ev_periodic_stop (loop, w);
ev_periodic_start (loop, w);
}
# 3740 "ev.c"
void __attribute__((__noinline__))
ev_signal_start (struct ev_loop *loop, ev_signal *w) throw()
{
if (__builtin_expect ((!!((0 + ((ev_watcher *)(void *)(w))->active))),(0)))
return;
((("libev: ev_signal_start called with illegal signal number", w->signum > 0 && w->signum < (65))) ? static_cast<void> (0) : __assert_fail ("(\"libev: ev_signal_start called with illegal signal number\", w->signum > 0 && w->signum < (65))", "ev.c", 3746, __PRETTY_FUNCTION__));
((("libev: a signal must not be attached to two different loops", !signals [w->signum - 1].loop || signals [w->signum - 1].loop == loop)) ? static_cast<void> (0) : __assert_fail ("(\"libev: a signal must not be attached to two different loops\", !signals [w->signum - 1].loop || signals [w->signum - 1].loop == loop)",
"ev.c"
# 3749 "ev.c"
,
3750
# 3749 "ev.c"
, __PRETTY_FUNCTION__))
;
signals [w->signum - 1].loop = loop;
__asm__ __volatile__ ("");
do { } while (0);
if (((loop)->sigfd) == -2)
{
((loop)->sigfd) = signalfd (-1, &((loop)->sigfd_set), 04000 | 02000000);
if (((loop)->sigfd) < 0 && (*__errno_location ()) == 22)
((loop)->sigfd) = signalfd (-1, &((loop)->sigfd_set), 0);
if (((loop)->sigfd) >= 0)
{
fd_intern (((loop)->sigfd));
sigemptyset (&((loop)->sigfd_set));
do { do { ((ev_watcher *)(void *)((&((loop)->sigfd_w))))->active = ((ev_watcher *)(void *)((&((loop)->sigfd_w))))->pending = 0; ( (ev_watcher *)(void *)(((&((loop)->sigfd_w)))))->priority = (0); (((&((loop)->sigfd_w))))->cb = ((sigfdcb)); } while (0); do { ((&((loop)->sigfd_w)))->fd = ((((loop)->sigfd))); ((&((loop)->sigfd_w)))->events = ((EV_READ)) | EV__IOFDSET; } while (0); } while (0);
( (ev_watcher *)(void *)(&((loop)->sigfd_w)))->priority = ((((0x7f) & 4) ? +2 : 0));
ev_io_start (loop, &((loop)->sigfd_w));
ev_unref (loop);
}
}
if (((loop)->sigfd) >= 0)
{
sigaddset (&((loop)->sigfd_set), w->signum);
sigprocmask (0, &((loop)->sigfd_set), 0);
signalfd (((loop)->sigfd), &((loop)->sigfd_set), 0);
}
ev_start (loop, (W)w, 1);
wlist_add (&signals [w->signum - 1].head, (WL)w);
if (!((WL)w)->next)
if (((loop)->sigfd) < 0)
{
struct sigaction sa;
evpipe_init (loop);
sa.__sigaction_handler.sa_handler = ev_sighandler;
sigfillset (&sa.sa_mask);
sa.sa_flags = 0x10000000;
sigaction (w->signum, &sa, 0);
if (((loop)->origflags) & EVFLAG_NOSIGMASK)
{
sigemptyset (&sa.sa_mask);
sigaddset (&sa.sa_mask, w->signum);
sigprocmask (1, &sa.sa_mask, 0);
}
}
do { } while (0);
}
void __attribute__((__noinline__))
ev_signal_stop (struct ev_loop *loop, ev_signal *w) throw()
{
clear_pending (loop, (W)w);
if (__builtin_expect ((!!(!(0 + ((ev_watcher *)(void *)(w))->active))),(0)))
return;
do { } while (0);
wlist_del (&signals [w->signum - 1].head, (WL)w);
ev_stop (loop, (W)w);
if (!signals [w->signum - 1].head)
{
signals [w->signum - 1].loop = 0;
if (((loop)->sigfd) >= 0)
{
sigset_t ss;
sigemptyset (&ss);
sigaddset (&ss, w->signum);
sigdelset (&((loop)->sigfd_set), w->signum);
signalfd (((loop)->sigfd), &((loop)->sigfd_set), 0);
sigprocmask (1, &ss, 0);
}
else
signal (w->signum, ((__sighandler_t) 0));
}
do { } while (0);
}
void
ev_child_start (struct ev_loop *loop, ev_child *w) throw()
{
((("libev: child watchers are only supported in the default loop", loop == ev_default_loop_ptr)) ? static_cast<void> (0) : __assert_fail ("(\"libev: child watchers are only supported in the default loop\", loop == ev_default_loop_ptr)", "ev.c", 3867, __PRETTY_FUNCTION__));
if (__builtin_expect ((!!((0 + ((ev_watcher *)(void *)(w))->active))),(0)))
return;
do { } while (0);
ev_start (loop, (W)w, 1);
wlist_add (&childs [w->pid & ((((0x7f) & 2) ? 16 : 1) - 1)], (WL)w);
do { } while (0);
}
void
ev_child_stop (struct ev_loop *loop, ev_child *w) throw()
{
clear_pending (loop, (W)w);
if (__builtin_expect ((!!(!(0 + ((ev_watcher *)(void *)(w))->active))),(0)))
return;
do { } while (0);
wlist_del (&childs [w->pid & ((((0x7f) & 2) ? 16 : 1) - 1)], (WL)w);
ev_stop (loop, (W)w);
do { } while (0);
}
# 3908 "ev.c"
static void __attribute__((__noinline__)) stat_timer_cb (struct ev_loop *loop, ev_timer *w_, int revents);
static void __attribute__((__noinline__))
infy_add (struct ev_loop *loop, ev_stat *w)
{
w->wd = inotify_add_watch (((loop)->fs_fd), w->path,
0x00000004 | 0x00000400 | 0x00000800 | 0x00000002
| 0x00000100 | 0x00000200 | 0x00000040 | 0x00000080
| 0x02000000 | 0x20000000);
if (w->wd >= 0)
{
struct statfs sfs;
if (!((loop)->fs_2625))
w->timer.repeat = w->interval ? w->interval : 5.0074891;
else if (!statfs (w->path, &sfs)
&& (sfs.f_type == 0x1373
|| sfs.f_type == 0x4006
|| sfs.f_type == 0x4d44
|| sfs.f_type == 0xEF53
|| sfs.f_type == 0x72b6
|| sfs.f_type == 0x858458f6
|| sfs.f_type == 0x5346544e
|| sfs.f_type == 0x3153464a
|| sfs.f_type == 0x9123683e
|| sfs.f_type == 0x52654973
|| sfs.f_type == 0x01021994
|| sfs.f_type == 0x58465342 ))
w->timer.repeat = 0.;
else
w->timer.repeat = w->interval ? w->interval : 30.1074891;
}
else
{
w->timer.repeat = w->interval ? w->interval : 5.0074891;
if (((*__errno_location ()) == 2 || (*__errno_location ()) == 13) && strlen (w->path) < 4096)
{
char path [4096];
strcpy (path, w->path);
do
{
int mask = 0x20000000 | 0x00000400 | 0x00000800
| ((*__errno_location ()) == 13 ? 0x00000004 : 0x00000100 | 0x00000080);
char *pend = strrchr (path, '/');
if (!pend || pend == path)
break;
*pend = 0;
w->wd = inotify_add_watch (((loop)->fs_fd), path, mask);
}
while (w->wd < 0 && ((*__errno_location ()) == 2 || (*__errno_location ()) == 13));
}
}
if (w->wd >= 0)
wlist_add (&((loop)->fs_hash) [w->wd & ((((0x7f) & 2) ? 16 : 1) - 1)].head, (WL)w);
if ((0 + ((ev_watcher *)(void *)(&w->timer))->active)) ev_ref (loop);
ev_timer_again (loop, &w->timer);
if ((0 + ((ev_watcher *)(void *)(&w->timer))->active)) ev_unref (loop);
}
static void __attribute__((__noinline__))
infy_del (struct ev_loop *loop, ev_stat *w)
{
int slot;
int wd = w->wd;
if (wd < 0)
return;
w->wd = -2;
slot = wd & ((((0x7f) & 2) ? 16 : 1) - 1);
wlist_del (&((loop)->fs_hash) [slot].head, (WL)w);
inotify_rm_watch (((loop)->fs_fd), wd);
}
static void __attribute__((__noinline__))
infy_wd (struct ev_loop *loop, int slot, int wd, struct inotify_event *ev)
{
if (slot < 0)
for (slot = 0; slot < (((0x7f) & 2) ? 16 : 1); ++slot)
infy_wd (loop, slot, wd, ev);
else
{
WL w_;
for (w_ = ((loop)->fs_hash) [slot & ((((0x7f) & 2) ? 16 : 1) - 1)].head; w_; )
{
ev_stat *w = (ev_stat *)w_;
w_ = w_->next;
if (w->wd == wd || wd == -1)
{
if (ev->mask & (0x00008000 | 0x00002000 | 0x00000400))
{
wlist_del (&((loop)->fs_hash) [slot & ((((0x7f) & 2) ? 16 : 1) - 1)].head, (WL)w);
w->wd = -1;
infy_add (loop, w);
}
stat_timer_cb (loop, &w->timer, 0);
}
}
}
}
static void
infy_cb (struct ev_loop *loop, ev_io *w, int revents)
{
char buf [(sizeof (struct inotify_event) * 2 + 255)];
int ofs;
int len = read (((loop)->fs_fd), buf, sizeof (buf));
for (ofs = 0; ofs < len; )
{
struct inotify_event *ev = (struct inotify_event *)(buf + ofs);
infy_wd (loop, ev->wd, ev->wd, ev);
ofs += sizeof (struct inotify_event) + ev->len;
}
}
static inline void __attribute__((__cold__))
ev_check_2625 (struct ev_loop *loop)
{
if (ev_linux_version () < 0x020619)
return;
((loop)->fs_2625) = 1;
}
static inline int
infy_newfd (void)
{
int fd = inotify_init1 (IN_CLOEXEC | IN_NONBLOCK);
if (fd >= 0)
return fd;
return inotify_init ();
}
static inline void
infy_init (struct ev_loop *loop)
{
if (((loop)->fs_fd) != -2)
return;
((loop)->fs_fd) = -1;
ev_check_2625 (loop);
((loop)->fs_fd) = infy_newfd ();
if (((loop)->fs_fd) >= 0)
{
fd_intern (((loop)->fs_fd));
do { do { ((ev_watcher *)(void *)((&((loop)->fs_w))))->active = ((ev_watcher *)(void *)((&((loop)->fs_w))))->pending = 0; ( (ev_watcher *)(void *)(((&((loop)->fs_w)))))->priority = (0); (((&((loop)->fs_w))))->cb = ((infy_cb)); } while (0); do { ((&((loop)->fs_w)))->fd = ((((loop)->fs_fd))); ((&((loop)->fs_w)))->events = ((EV_READ)) | EV__IOFDSET; } while (0); } while (0);
( (ev_watcher *)(void *)(&((loop)->fs_w)))->priority = ((((0x7f) & 4) ? +2 : 0));
ev_io_start (loop, &((loop)->fs_w));
ev_unref (loop);
}
}
static inline void
infy_fork (struct ev_loop *loop)
{
int slot;
if (((loop)->fs_fd) < 0)
return;
ev_ref (loop);
ev_io_stop (loop, &((loop)->fs_w));
close (((loop)->fs_fd));
((loop)->fs_fd) = infy_newfd ();
if (((loop)->fs_fd) >= 0)
{
fd_intern (((loop)->fs_fd));
do { (&((loop)->fs_w))->fd = (((loop)->fs_fd)); (&((loop)->fs_w))->events = (EV_READ) | EV__IOFDSET; } while (0);
ev_io_start (loop, &((loop)->fs_w));
ev_unref (loop);
}
for (slot = 0; slot < (((0x7f) & 2) ? 16 : 1); ++slot)
{
WL w_ = ((loop)->fs_hash) [slot].head;
((loop)->fs_hash) [slot].head = 0;
while (w_)
{
ev_stat *w = (ev_stat *)w_;
w_ = w_->next;
w->wd = -1;
if (((loop)->fs_fd) >= 0)
infy_add (loop, w);
else
{
w->timer.repeat = w->interval ? w->interval : 5.0074891;
if ((0 + ((ev_watcher *)(void *)(&w->timer))->active)) ev_ref (loop);
ev_timer_again (loop, &w->timer);
if ((0 + ((ev_watcher *)(void *)(&w->timer))->active)) ev_unref (loop);
}
}
}
}
# 4151 "ev.c"
void
ev_stat_stat (struct ev_loop *loop, ev_stat *w) throw()
{
if (lstat (w->path, &w->attr) < 0)
w->attr.st_nlink = 0;
else if (!w->attr.st_nlink)
w->attr.st_nlink = 1;
}
static void __attribute__((__noinline__))
stat_timer_cb (struct ev_loop *loop, ev_timer *w_, int revents)
{
ev_stat *w = (ev_stat *)(((char *)w_) - __builtin_offsetof (ev_stat, timer));
ev_statdata prev = w->attr;
ev_stat_stat (loop, w);
if (
prev.st_dev != w->attr.st_dev
|| prev.st_ino != w->attr.st_ino
|| prev.st_mode != w->attr.st_mode
|| prev.st_nlink != w->attr.st_nlink
|| prev.st_uid != w->attr.st_uid
|| prev.st_gid != w->attr.st_gid
|| prev.st_rdev != w->attr.st_rdev
|| prev.st_size != w->attr.st_size
|| prev.st_atim.tv_sec != w->attr.st_atim.tv_sec
|| prev.st_mtim.tv_sec != w->attr.st_mtim.tv_sec
|| prev.st_ctim.tv_sec != w->attr.st_ctim.tv_sec
) {
w->prev = prev;
if (((loop)->fs_fd) >= 0)
{
infy_del (loop, w);
infy_add (loop, w);
ev_stat_stat (loop, w);
}
ev_feed_event (loop, w, EV_STAT);
}
}
void
ev_stat_start (struct ev_loop *loop, ev_stat *w) throw()
{
if (__builtin_expect ((!!((0 + ((ev_watcher *)(void *)(w))->active))),(0)))
return;
ev_stat_stat (loop, w);
if (w->interval < 0.1074891 && w->interval)
w->interval = 0.1074891;
do { do { ((ev_watcher *)(void *)((&w->timer)))->active = ((ev_watcher *)(void *)((&w->timer)))->pending = 0; ( (ev_watcher *)(void *)(((&w->timer))))->priority = (0); (((&w->timer)))->cb = ((stat_timer_cb)); } while (0); do { ((ev_watcher_time *)((&w->timer)))->at = ((0.)); ((&w->timer))->repeat = ((w->interval ? w->interval : 5.0074891)); } while (0); } while (0);
( (ev_watcher *)(void *)(&w->timer))->priority = ((+(((ev_watcher *)(void *)(w))->priority)));
infy_init (loop);
if (((loop)->fs_fd) >= 0)
infy_add (loop, w);
else
{
ev_timer_again (loop, &w->timer);
ev_unref (loop);
}
ev_start (loop, (W)w, 1);
do { } while (0);
}
void
ev_stat_stop (struct ev_loop *loop, ev_stat *w) throw()
{
clear_pending (loop, (W)w);
if (__builtin_expect ((!!(!(0 + ((ev_watcher *)(void *)(w))->active))),(0)))
return;
do { } while (0);
infy_del (loop, w);
if ((0 + ((ev_watcher *)(void *)(&w->timer))->active))
{
ev_ref (loop);
ev_timer_stop (loop, &w->timer);
}
ev_stop (loop, (W)w);
do { } while (0);
}
void
ev_idle_start (struct ev_loop *loop, ev_idle *w) throw()
{
if (__builtin_expect ((!!((0 + ((ev_watcher *)(void *)(w))->active))),(0)))
return;
pri_adjust (loop, (W)w);
do { } while (0);
{
int active = ++((loop)->idlecnt) [(((W)w)->priority - (((0x7f) & 4) ? -2 : 0))];
++((loop)->idleall);
ev_start (loop, (W)w, active);
if (__builtin_expect ((!!((active) > (((loop)->idlemax) [(((W)w)->priority - (((0x7f) & 4) ? -2 : 0))]))),(0))) { int __attribute__((__unused__)) ocur_ = (((loop)->idlemax) [(((W)w)->priority - (((0x7f) & 4) ? -2 : 0))]); (((loop)->idles) [(((W)w)->priority - (((0x7f) & 4) ? -2 : 0))]) = (ev_idle * *)array_realloc (sizeof (ev_idle *), (((loop)->idles) [(((W)w)->priority - (((0x7f) & 4) ? -2 : 0))]), &(((loop)->idlemax) [(((W)w)->priority - (((0x7f) & 4) ? -2 : 0))]), (active)); ; };
((loop)->idles) [(((W)w)->priority - (((0x7f) & 4) ? -2 : 0))][active - 1] = w;
}
do { } while (0);
}
void
ev_idle_stop (struct ev_loop *loop, ev_idle *w) throw()
{
clear_pending (loop, (W)w);
if (__builtin_expect ((!!(!(0 + ((ev_watcher *)(void *)(w))->active))),(0)))
return;
do { } while (0);
{
int active = ((W)(w))->active;
((loop)->idles) [(((W)w)->priority - (((0x7f) & 4) ? -2 : 0))][active - 1] = ((loop)->idles) [(((W)w)->priority - (((0x7f) & 4) ? -2 : 0))][--((loop)->idlecnt) [(((W)w)->priority - (((0x7f) & 4) ? -2 : 0))]];
((W)(((loop)->idles) [(((W)w)->priority - (((0x7f) & 4) ? -2 : 0))][active - 1]))->active = active;
ev_stop (loop, (W)w);
--((loop)->idleall);
}
do { } while (0);
}
void
ev_prepare_start (struct ev_loop *loop, ev_prepare *w) throw()
{
if (__builtin_expect ((!!((0 + ((ev_watcher *)(void *)(w))->active))),(0)))
return;
do { } while (0);
ev_start (loop, (W)w, ++((loop)->preparecnt));
if (__builtin_expect ((!!((((loop)->preparecnt)) > (((loop)->preparemax)))),(0))) { int __attribute__((__unused__)) ocur_ = (((loop)->preparemax)); (((loop)->prepares)) = (ev_prepare * *)array_realloc (sizeof (ev_prepare *), (((loop)->prepares)), &(((loop)->preparemax)), (((loop)->preparecnt))); ; };
((loop)->prepares) [((loop)->preparecnt) - 1] = w;
do { } while (0);
}
void
ev_prepare_stop (struct ev_loop *loop, ev_prepare *w) throw()
{
clear_pending (loop, (W)w);
if (__builtin_expect ((!!(!(0 + ((ev_watcher *)(void *)(w))->active))),(0)))
return;
do { } while (0);
{
int active = ((W)(w))->active;
((loop)->prepares) [active - 1] = ((loop)->prepares) [--((loop)->preparecnt)];
((W)(((loop)->prepares) [active - 1]))->active = active;
}
ev_stop (loop, (W)w);
do { } while (0);
}
void
ev_check_start (struct ev_loop *loop, ev_check *w) throw()
{
if (__builtin_expect ((!!((0 + ((ev_watcher *)(void *)(w))->active))),(0)))
return;
do { } while (0);
ev_start (loop, (W)w, ++((loop)->checkcnt));
if (__builtin_expect ((!!((((loop)->checkcnt)) > (((loop)->checkmax)))),(0))) { int __attribute__((__unused__)) ocur_ = (((loop)->checkmax)); (((loop)->checks)) = (ev_check * *)array_realloc (sizeof (ev_check *), (((loop)->checks)), &(((loop)->checkmax)), (((loop)->checkcnt))); ; };
((loop)->checks) [((loop)->checkcnt) - 1] = w;
do { } while (0);
}
void
ev_check_stop (struct ev_loop *loop, ev_check *w) throw()
{
clear_pending (loop, (W)w);
if (__builtin_expect ((!!(!(0 + ((ev_watcher *)(void *)(w))->active))),(0)))
return;
do { } while (0);
{
int active = ((W)(w))->active;
((loop)->checks) [active - 1] = ((loop)->checks) [--((loop)->checkcnt)];
((W)(((loop)->checks) [active - 1]))->active = active;
}
ev_stop (loop, (W)w);
do { } while (0);
}
void __attribute__((__noinline__))
ev_embed_sweep (struct ev_loop *loop, ev_embed *w) throw()
{
ev_run (w->other, EVRUN_NOWAIT);
}
static void
embed_io_cb (struct ev_loop *loop, ev_io *io, int revents)
{
ev_embed *w = (ev_embed *)(((char *)io) - __builtin_offsetof (ev_embed, io));
if ((w)->cb)
ev_feed_event (loop, (W)w, EV_EMBED);
else
ev_run (w->other, EVRUN_NOWAIT);
}
static void
embed_prepare_cb (struct ev_loop *loop, ev_prepare *prepare, int revents)
{
ev_embed *w = (ev_embed *)(((char *)prepare) - __builtin_offsetof (ev_embed, prepare));
{
struct ev_loop *loop = w->other;
while (((loop)->fdchangecnt))
{
fd_reify (loop);
ev_run (loop, EVRUN_NOWAIT);
}
}
}
static void
embed_fork_cb (struct ev_loop *loop, ev_fork *fork_w, int revents)
{
ev_embed *w = (ev_embed *)(((char *)fork_w) - __builtin_offsetof (ev_embed, fork));
ev_embed_stop (loop, w);
{
struct ev_loop *loop = w->other;
ev_loop_fork (loop);
ev_run (loop, EVRUN_NOWAIT);
}
ev_embed_start (loop, w);
}
# 4438 "ev.c"
void
ev_embed_start (struct ev_loop *loop, ev_embed *w) throw()
{
if (__builtin_expect ((!!((0 + ((ev_watcher *)(void *)(w))->active))),(0)))
return;
{
struct ev_loop *loop = w->other;
((("libev: loop to be embedded is not embeddable", ((loop)->backend) & ev_embeddable_backends ())) ? static_cast<void> (0) : __assert_fail ("(\"libev: loop to be embedded is not embeddable\", ((loop)->backend) & ev_embeddable_backends ())", "ev.c", 4446, __PRETTY_FUNCTION__));
do { do { ((ev_watcher *)(void *)((&w->io)))->active = ((ev_watcher *)(void *)((&w->io)))->pending = 0; ( (ev_watcher *)(void *)(((&w->io))))->priority = (0); (((&w->io)))->cb = ((embed_io_cb)); } while (0); do { ((&w->io))->fd = ((((loop)->backend_fd))); ((&w->io))->events = ((EV_READ)) | EV__IOFDSET; } while (0); } while (0);
}
do { } while (0);
( (ev_watcher *)(void *)(&w->io))->priority = ((+(((ev_watcher *)(void *)(w))->priority)));
ev_io_start (loop, &w->io);
do { do { ((ev_watcher *)(void *)((&w->prepare)))->active = ((ev_watcher *)(void *)((&w->prepare)))->pending = 0; ( (ev_watcher *)(void *)(((&w->prepare))))->priority = (0); (((&w->prepare)))->cb = ((embed_prepare_cb)); } while (0); ; } while (0);
( (ev_watcher *)(void *)(&w->prepare))->priority = ((((0x7f) & 4) ? -2 : 0));
ev_prepare_start (loop, &w->prepare);
do { do { ((ev_watcher *)(void *)((&w->fork)))->active = ((ev_watcher *)(void *)((&w->fork)))->pending = 0; ( (ev_watcher *)(void *)(((&w->fork))))->priority = (0); (((&w->fork)))->cb = ((embed_fork_cb)); } while (0); ; } while (0);
ev_fork_start (loop, &w->fork);
ev_start (loop, (W)w, 1);
do { } while (0);
}
void
ev_embed_stop (struct ev_loop *loop, ev_embed *w) throw()
{
clear_pending (loop, (W)w);
if (__builtin_expect ((!!(!(0 + ((ev_watcher *)(void *)(w))->active))),(0)))
return;
do { } while (0);
ev_io_stop (loop, &w->io);
ev_prepare_stop (loop, &w->prepare);
ev_fork_stop (loop, &w->fork);
ev_stop (loop, (W)w);
do { } while (0);
}
void
ev_fork_start (struct ev_loop *loop, ev_fork *w) throw()
{
if (__builtin_expect ((!!((0 + ((ev_watcher *)(void *)(w))->active))),(0)))
return;
do { } while (0);
ev_start (loop, (W)w, ++((loop)->forkcnt));
if (__builtin_expect ((!!((((loop)->forkcnt)) > (((loop)->forkmax)))),(0))) { int __attribute__((__unused__)) ocur_ = (((loop)->forkmax)); (((loop)->forks)) = (ev_fork * *)array_realloc (sizeof (ev_fork *), (((loop)->forks)), &(((loop)->forkmax)), (((loop)->forkcnt))); ; };
((loop)->forks) [((loop)->forkcnt) - 1] = w;
do { } while (0);
}
void
ev_fork_stop (struct ev_loop *loop, ev_fork *w) throw()
{
clear_pending (loop, (W)w);
if (__builtin_expect ((!!(!(0 + ((ev_watcher *)(void *)(w))->active))),(0)))
return;
do { } while (0);
{
int active = ((W)(w))->active;
((loop)->forks) [active - 1] = ((loop)->forks) [--((loop)->forkcnt)];
((W)(((loop)->forks) [active - 1]))->active = active;
}
ev_stop (loop, (W)w);
do { } while (0);
}
void
ev_cleanup_start (struct ev_loop *loop, ev_cleanup *w) throw()
{
if (__builtin_expect ((!!((0 + ((ev_watcher *)(void *)(w))->active))),(0)))
return;
do { } while (0);
ev_start (loop, (W)w, ++((loop)->cleanupcnt));
if (__builtin_expect ((!!((((loop)->cleanupcnt)) > (((loop)->cleanupmax)))),(0))) { int __attribute__((__unused__)) ocur_ = (((loop)->cleanupmax)); (((loop)->cleanups)) = (ev_cleanup * *)array_realloc (sizeof (ev_cleanup *), (((loop)->cleanups)), &(((loop)->cleanupmax)), (((loop)->cleanupcnt))); ; };
((loop)->cleanups) [((loop)->cleanupcnt) - 1] = w;
ev_unref (loop);
do { } while (0);
}
void
ev_cleanup_stop (struct ev_loop *loop, ev_cleanup *w) throw()
{
clear_pending (loop, (W)w);
if (__builtin_expect ((!!(!(0 + ((ev_watcher *)(void *)(w))->active))),(0)))
return;
do { } while (0);
ev_ref (loop);
{
int active = ((W)(w))->active;
((loop)->cleanups) [active - 1] = ((loop)->cleanups) [--((loop)->cleanupcnt)];
((W)(((loop)->cleanups) [active - 1]))->active = active;
}
ev_stop (loop, (W)w);
do { } while (0);
}
void
ev_async_start (struct ev_loop *loop, ev_async *w) throw()
{
if (__builtin_expect ((!!((0 + ((ev_watcher *)(void *)(w))->active))),(0)))
return;
w->sent = 0;
evpipe_init (loop);
do { } while (0);
ev_start (loop, (W)w, ++((loop)->asynccnt));
if (__builtin_expect ((!!((((loop)->asynccnt)) > (((loop)->asyncmax)))),(0))) { int __attribute__((__unused__)) ocur_ = (((loop)->asyncmax)); (((loop)->asyncs)) = (ev_async * *)array_realloc (sizeof (ev_async *), (((loop)->asyncs)), &(((loop)->asyncmax)), (((loop)->asynccnt))); ; };
((loop)->asyncs) [((loop)->asynccnt) - 1] = w;
do { } while (0);
}
void
ev_async_stop (struct ev_loop *loop, ev_async *w) throw()
{
clear_pending (loop, (W)w);
if (__builtin_expect ((!!(!(0 + ((ev_watcher *)(void *)(w))->active))),(0)))
return;
do { } while (0);
{
int active = ((W)(w))->active;
((loop)->asyncs) [active - 1] = ((loop)->asyncs) [--((loop)->asynccnt)];
((W)(((loop)->asyncs) [active - 1]))->active = active;
}
ev_stop (loop, (W)w);
do { } while (0);
}
void
ev_async_send (struct ev_loop *loop, ev_async *w) throw()
{
w->sent = 1;
evpipe_write (loop, &((loop)->async_pending));
}
struct ev_once
{
ev_io io;
ev_timer to;
void (*cb)(int revents, void *arg);
void *arg;
};
static void
once_cb (struct ev_loop *loop, struct ev_once *once, int revents)
{
void (*cb)(int revents, void *arg) = once->cb;
void *arg = once->arg;
ev_io_stop (loop, &once->io);
ev_timer_stop (loop, &once->to);
ev_realloc ((once), 0);
cb (revents, arg);
}
static void
once_cb_io (struct ev_loop *loop, ev_io *w, int revents)
{
struct ev_once *once = (struct ev_once *)(((char *)w) - __builtin_offsetof (struct ev_once, io));
once_cb (loop, once, revents | ev_clear_pending (loop, &once->to));
}
static void
once_cb_to (struct ev_loop *loop, ev_timer *w, int revents)
{
struct ev_once *once = (struct ev_once *)(((char *)w) - __builtin_offsetof (struct ev_once, to));
once_cb (loop, once, revents | ev_clear_pending (loop, &once->io));
}
void
ev_once (struct ev_loop *loop, int fd, int events, ev_tstamp timeout, void (*cb)(int revents, void *arg), void *arg) throw()
{
struct ev_once *once = (struct ev_once *)ev_realloc (0, (sizeof (struct ev_once)));
if (__builtin_expect ((!!(!once)),(0)))
{
cb (EV_ERROR | EV_READ | EV_WRITE | EV_TIMER, arg);
return;
}
once->cb = cb;
once->arg = arg;
do { ((ev_watcher *)(void *)(&once->io))->active = ((ev_watcher *)(void *)(&once->io))->pending = 0; ( (ev_watcher *)(void *)((&once->io)))->priority = (0); ((&once->io))->cb = (once_cb_io); } while (0);
if (fd >= 0)
{
do { (&once->io)->fd = (fd); (&once->io)->events = (events) | EV__IOFDSET; } while (0);
ev_io_start (loop, &once->io);
}
do { ((ev_watcher *)(void *)(&once->to))->active = ((ev_watcher *)(void *)(&once->to))->pending = 0; ( (ev_watcher *)(void *)((&once->to)))->priority = (0); ((&once->to))->cb = (once_cb_to); } while (0);
if (timeout >= 0.)
{
do { ((ev_watcher_time *)(&once->to))->at = (timeout); (&once->to)->repeat = (0.); } while (0);
ev_timer_start (loop, &once->to);
}
}
# 4801 "ev.c"
# 1 "ev_wrap.h" 1
# 4802 "ev.c" 2
ev.c
最新推荐文章于 2022-02-23 19:00:00 发布