Commit 86cbafe9 authored by Jason Madden's avatar Jason Madden

Grab the latest ev.c from CVS, r1.480, which moves around the modifiers to fix...

Grab the latest ev.c from CVS, r1.480, which moves around the modifiers to fix the noinline problem.
parent 393e5201
...@@ -1529,7 +1529,7 @@ ecb_binary32_to_binary16 (uint32_t x) ...@@ -1529,7 +1529,7 @@ ecb_binary32_to_binary16 (uint32_t x)
#if EV_FEATURE_CODE #if EV_FEATURE_CODE
# define inline_speed ecb_inline # define inline_speed ecb_inline
#else #else
# define inline_speed static noinline # define inline_speed noinline static
#endif #endif
#define NUMPRI (EV_MAXPRI - EV_MINPRI + 1) #define NUMPRI (EV_MAXPRI - EV_MINPRI + 1)
...@@ -1586,7 +1586,8 @@ static EV_ATOMIC_T have_monotonic; /* did clock_gettime (CLOCK_MONOTONIC) work? ...@@ -1586,7 +1586,8 @@ static EV_ATOMIC_T have_monotonic; /* did clock_gettime (CLOCK_MONOTONIC) work?
#include <float.h> #include <float.h>
/* a floor() replacement function, should be independent of ev_tstamp type */ /* a floor() replacement function, should be independent of ev_tstamp type */
static ev_tstamp noinline noinline
static ev_tstamp
ev_floor (ev_tstamp v) ev_floor (ev_tstamp v)
{ {
/* the choice of shift factor is not terribly important */ /* the choice of shift factor is not terribly important */
...@@ -1628,7 +1629,8 @@ ev_floor (ev_tstamp v) ...@@ -1628,7 +1629,8 @@ ev_floor (ev_tstamp v)
# include <sys/utsname.h> # include <sys/utsname.h>
#endif #endif
static unsigned int noinline ecb_cold noinline ecb_cold
static unsigned int
ev_linux_version (void) ev_linux_version (void)
{ {
#ifdef __linux #ifdef __linux
...@@ -1667,7 +1669,8 @@ ev_linux_version (void) ...@@ -1667,7 +1669,8 @@ ev_linux_version (void)
/*****************************************************************************/ /*****************************************************************************/
#if EV_AVOID_STDIO #if EV_AVOID_STDIO
static void noinline ecb_cold noinline ecb_cold
static void
ev_printerr (const char *msg) ev_printerr (const char *msg)
{ {
write (STDERR_FILENO, msg, strlen (msg)); write (STDERR_FILENO, msg, strlen (msg));
...@@ -1676,13 +1679,15 @@ ev_printerr (const char *msg) ...@@ -1676,13 +1679,15 @@ ev_printerr (const char *msg)
static void (*syserr_cb)(const char *msg) EV_THROW; static void (*syserr_cb)(const char *msg) EV_THROW;
void ecb_cold ecb_cold
void
ev_set_syserr_cb (void (*cb)(const char *msg) EV_THROW) EV_THROW ev_set_syserr_cb (void (*cb)(const char *msg) EV_THROW) EV_THROW
{ {
syserr_cb = cb; syserr_cb = cb;
} }
static void noinline ecb_cold noinline ecb_cold
static void
ev_syserr (const char *msg) ev_syserr (const char *msg)
{ {
if (!msg) if (!msg)
...@@ -1723,7 +1728,8 @@ ev_realloc_emul (void *ptr, long size) EV_THROW ...@@ -1723,7 +1728,8 @@ ev_realloc_emul (void *ptr, long size) EV_THROW
static void *(*alloc)(void *ptr, long size) EV_THROW = ev_realloc_emul; static void *(*alloc)(void *ptr, long size) EV_THROW = ev_realloc_emul;
void ecb_cold ecb_cold
void
ev_set_allocator (void *(*cb)(void *ptr, long size) EV_THROW) EV_THROW ev_set_allocator (void *(*cb)(void *ptr, long size) EV_THROW) EV_THROW
{ {
alloc = cb; alloc = cb;
...@@ -1941,8 +1947,9 @@ array_nextsize (int elem, int cur, int cnt) ...@@ -1941,8 +1947,9 @@ array_nextsize (int elem, int cur, int cnt)
return ncur; return ncur;
} }
/* gevent: remove noinline, breaks all the appveyor builds */
static void * ecb_cold noinline ecb_cold
static void *
array_realloc (int elem, void *base, int *cur, int cnt) array_realloc (int elem, void *base, int *cur, int cnt)
{ {
*cur = array_nextsize (elem, *cur, cnt); *cur = array_nextsize (elem, *cur, cnt);
...@@ -1955,7 +1962,7 @@ array_realloc (int elem, void *base, int *cur, int cnt) ...@@ -1955,7 +1962,7 @@ array_realloc (int elem, void *base, int *cur, int cnt)
#define array_needsize(type,base,cur,cnt,init) \ #define array_needsize(type,base,cur,cnt,init) \
if (expect_false ((cnt) > (cur))) \ if (expect_false ((cnt) > (cur))) \
{ \ { \
int ecb_unused ocur_ = (cur); \ ecb_unused int ocur_ = (cur); \
(base) = (type *)array_realloc \ (base) = (type *)array_realloc \
(sizeof (type), (base), &(cur), (cnt)); \ (sizeof (type), (base), &(cur), (cnt)); \
init ((base) + (ocur_), (cur) - ocur_); \ init ((base) + (ocur_), (cur) - ocur_); \
...@@ -1977,12 +1984,14 @@ array_realloc (int elem, void *base, int *cur, int cnt) ...@@ -1977,12 +1984,14 @@ array_realloc (int elem, void *base, int *cur, int cnt)
/*****************************************************************************/ /*****************************************************************************/
/* dummy callback for pending events */ /* dummy callback for pending events */
static void noinline noinline
static void
pendingcb (EV_P_ ev_prepare *w, int revents) pendingcb (EV_P_ ev_prepare *w, int revents)
{ {
} }
void noinline noinline
void
ev_feed_event (EV_P_ void *w, int revents) EV_THROW ev_feed_event (EV_P_ void *w, int revents) EV_THROW
{ {
W w_ = (W)w; W w_ = (W)w;
...@@ -2122,7 +2131,8 @@ fd_reify (EV_P) ...@@ -2122,7 +2131,8 @@ fd_reify (EV_P)
} }
/* something about the given fd changed */ /* something about the given fd changed */
inline_size void inline_size
void
fd_change (EV_P_ int fd, int flags) fd_change (EV_P_ int fd, int flags)
{ {
unsigned char reify = anfds [fd].reify; unsigned char reify = anfds [fd].reify;
...@@ -2137,7 +2147,7 @@ fd_change (EV_P_ int fd, int flags) ...@@ -2137,7 +2147,7 @@ fd_change (EV_P_ int fd, int flags)
} }
/* the given fd is invalid/unusable, so make sure it doesn't hurt us anymore */ /* the given fd is invalid/unusable, so make sure it doesn't hurt us anymore */
inline_speed void ecb_cold inline_speed ecb_cold void
fd_kill (EV_P_ int fd) fd_kill (EV_P_ int fd)
{ {
ev_io *w; ev_io *w;
...@@ -2150,7 +2160,7 @@ fd_kill (EV_P_ int fd) ...@@ -2150,7 +2160,7 @@ fd_kill (EV_P_ int fd)
} }
/* check whether the given fd is actually valid, for error recovery */ /* check whether the given fd is actually valid, for error recovery */
inline_size int ecb_cold inline_size ecb_cold int
fd_valid (int fd) fd_valid (int fd)
{ {
#ifdef _WIN32 #ifdef _WIN32
...@@ -2161,7 +2171,8 @@ fd_valid (int fd) ...@@ -2161,7 +2171,8 @@ fd_valid (int fd)
} }
/* called on EBADF to verify fds */ /* called on EBADF to verify fds */
static void noinline ecb_cold noinline ecb_cold
static void
fd_ebadf (EV_P) fd_ebadf (EV_P)
{ {
int fd; int fd;
...@@ -2173,7 +2184,8 @@ fd_ebadf (EV_P) ...@@ -2173,7 +2184,8 @@ fd_ebadf (EV_P)
} }
/* called on ENOMEM in select/poll to kill some fds and retry */ /* called on ENOMEM in select/poll to kill some fds and retry */
static void noinline ecb_cold noinline ecb_cold
static void
fd_enomem (EV_P) fd_enomem (EV_P)
{ {
int fd; int fd;
...@@ -2187,7 +2199,8 @@ fd_enomem (EV_P) ...@@ -2187,7 +2199,8 @@ fd_enomem (EV_P)
} }
/* usually called after fork if backend needs to re-arm all fds from scratch */ /* usually called after fork if backend needs to re-arm all fds from scratch */
static void noinline noinline
static void
fd_rearm_all (EV_P) fd_rearm_all (EV_P)
{ {
int fd; int fd;
...@@ -2378,7 +2391,8 @@ static ANSIG signals [EV_NSIG - 1]; ...@@ -2378,7 +2391,8 @@ static ANSIG signals [EV_NSIG - 1];
#if EV_SIGNAL_ENABLE || EV_ASYNC_ENABLE #if EV_SIGNAL_ENABLE || EV_ASYNC_ENABLE
static void noinline ecb_cold noinline ecb_cold
static void
evpipe_init (EV_P) evpipe_init (EV_P)
{ {
if (!ev_is_active (&pipe_w)) if (!ev_is_active (&pipe_w))
...@@ -2566,7 +2580,8 @@ ev_sighandler (int signum) ...@@ -2566,7 +2580,8 @@ ev_sighandler (int signum)
ev_feed_signal (signum); ev_feed_signal (signum);
} }
void noinline noinline
void
ev_feed_signal_event (EV_P_ int signum) EV_THROW ev_feed_signal_event (EV_P_ int signum) EV_THROW
{ {
WL w; WL w;
...@@ -2693,20 +2708,20 @@ childcb (EV_P_ ev_signal *sw, int revents) ...@@ -2693,20 +2708,20 @@ childcb (EV_P_ ev_signal *sw, int revents)
# include "ev_select.c" # include "ev_select.c"
#endif #endif
int ecb_cold ecb_cold int
ev_version_major (void) EV_THROW ev_version_major (void) EV_THROW
{ {
return EV_VERSION_MAJOR; return EV_VERSION_MAJOR;
} }
int ecb_cold ecb_cold int
ev_version_minor (void) EV_THROW ev_version_minor (void) EV_THROW
{ {
return EV_VERSION_MINOR; return EV_VERSION_MINOR;
} }
/* return true if we are running with elevated privileges and should ignore env variables */ /* return true if we are running with elevated privileges and should ignore env variables */
int inline_size ecb_cold inline_size ecb_cold int
enable_secure (void) enable_secure (void)
{ {
#ifdef _WIN32 #ifdef _WIN32
...@@ -2717,7 +2732,8 @@ enable_secure (void) ...@@ -2717,7 +2732,8 @@ enable_secure (void)
#endif #endif
} }
unsigned int ecb_cold ecb_cold
unsigned int
ev_supported_backends (void) EV_THROW ev_supported_backends (void) EV_THROW
{ {
unsigned int flags = 0; unsigned int flags = 0;
...@@ -2731,7 +2747,8 @@ ev_supported_backends (void) EV_THROW ...@@ -2731,7 +2747,8 @@ ev_supported_backends (void) EV_THROW
return flags; return flags;
} }
unsigned int ecb_cold ecb_cold
unsigned int
ev_recommended_backends (void) EV_THROW ev_recommended_backends (void) EV_THROW
{ {
unsigned int flags = ev_supported_backends (); unsigned int flags = ev_supported_backends ();
...@@ -2753,7 +2770,8 @@ ev_recommended_backends (void) EV_THROW ...@@ -2753,7 +2770,8 @@ ev_recommended_backends (void) EV_THROW
return flags; return flags;
} }
unsigned int ecb_cold ecb_cold
unsigned int
ev_embeddable_backends (void) EV_THROW ev_embeddable_backends (void) EV_THROW
{ {
int flags = EVBACKEND_EPOLL | EVBACKEND_KQUEUE | EVBACKEND_PORT; int flags = EVBACKEND_EPOLL | EVBACKEND_KQUEUE | EVBACKEND_PORT;
...@@ -2823,7 +2841,8 @@ ev_set_loop_release_cb (EV_P_ void (*release)(EV_P) EV_THROW, void (*acquire)(EV ...@@ -2823,7 +2841,8 @@ ev_set_loop_release_cb (EV_P_ void (*release)(EV_P) EV_THROW, void (*acquire)(EV
#endif #endif
/* initialise a loop structure, must be zero-initialised */ /* initialise a loop structure, must be zero-initialised */
static void noinline ecb_cold noinline ecb_cold
static void
loop_init (EV_P_ unsigned int flags) EV_THROW loop_init (EV_P_ unsigned int flags) EV_THROW
{ {
if (!backend) if (!backend)
...@@ -2920,7 +2939,8 @@ loop_init (EV_P_ unsigned int flags) EV_THROW ...@@ -2920,7 +2939,8 @@ loop_init (EV_P_ unsigned int flags) EV_THROW
} }
/* free up a loop structure */ /* free up a loop structure */
void ecb_cold ecb_cold
void
ev_loop_destroy (EV_P) ev_loop_destroy (EV_P)
{ {
int i; int i;
...@@ -3072,7 +3092,8 @@ loop_fork (EV_P) ...@@ -3072,7 +3092,8 @@ loop_fork (EV_P)
#if EV_MULTIPLICITY #if EV_MULTIPLICITY
struct ev_loop * ecb_cold ecb_cold
struct ev_loop *
ev_loop_new (unsigned int flags) EV_THROW ev_loop_new (unsigned int flags) EV_THROW
{ {
EV_P = (struct ev_loop *)ev_malloc (sizeof (struct ev_loop)); EV_P = (struct ev_loop *)ev_malloc (sizeof (struct ev_loop));
...@@ -3090,7 +3111,8 @@ ev_loop_new (unsigned int flags) EV_THROW ...@@ -3090,7 +3111,8 @@ ev_loop_new (unsigned int flags) EV_THROW
#endif /* multiplicity */ #endif /* multiplicity */
#if EV_VERIFY #if EV_VERIFY
static void noinline ecb_cold noinline ecb_cold
static void
verify_watcher (EV_P_ W w) verify_watcher (EV_P_ W w)
{ {
assert (("libev: watcher has invalid priority", ABSPRI (w) >= 0 && ABSPRI (w) < NUMPRI)); assert (("libev: watcher has invalid priority", ABSPRI (w) >= 0 && ABSPRI (w) < NUMPRI));
...@@ -3099,7 +3121,8 @@ verify_watcher (EV_P_ W w) ...@@ -3099,7 +3121,8 @@ verify_watcher (EV_P_ W w)
assert (("libev: pending watcher not on pending queue", pendings [ABSPRI (w)][w->pending - 1].w == w)); assert (("libev: pending watcher not on pending queue", pendings [ABSPRI (w)][w->pending - 1].w == w));
} }
static void noinline ecb_cold noinline ecb_cold
static void
verify_heap (EV_P_ ANHE *heap, int N) verify_heap (EV_P_ ANHE *heap, int N)
{ {
int i; int i;
...@@ -3114,7 +3137,8 @@ verify_heap (EV_P_ ANHE *heap, int N) ...@@ -3114,7 +3137,8 @@ verify_heap (EV_P_ ANHE *heap, int N)
} }
} }
static void noinline ecb_cold noinline ecb_cold
static void
array_verify (EV_P_ W *ws, int cnt) array_verify (EV_P_ W *ws, int cnt)
{ {
while (cnt--) while (cnt--)
...@@ -3213,7 +3237,8 @@ ev_verify (EV_P) EV_THROW ...@@ -3213,7 +3237,8 @@ ev_verify (EV_P) EV_THROW
#endif #endif
#if EV_MULTIPLICITY #if EV_MULTIPLICITY
struct ev_loop * ecb_cold ecb_cold
struct ev_loop *
#else #else
int int
#endif #endif
...@@ -3271,7 +3296,8 @@ ev_pending_count (EV_P) EV_THROW ...@@ -3271,7 +3296,8 @@ ev_pending_count (EV_P) EV_THROW
return count; return count;
} }
void noinline noinline
void
ev_invoke_pending (EV_P) ev_invoke_pending (EV_P)
{ {
pendingpri = NUMPRI; pendingpri = NUMPRI;
...@@ -3356,7 +3382,8 @@ timers_reify (EV_P) ...@@ -3356,7 +3382,8 @@ timers_reify (EV_P)
#if EV_PERIODIC_ENABLE #if EV_PERIODIC_ENABLE
static void noinline noinline
static void
periodic_recalc (EV_P_ ev_periodic *w) periodic_recalc (EV_P_ ev_periodic *w)
{ {
ev_tstamp interval = w->interval > MIN_INTERVAL ? w->interval : MIN_INTERVAL; ev_tstamp interval = w->interval > MIN_INTERVAL ? w->interval : MIN_INTERVAL;
...@@ -3424,7 +3451,8 @@ periodics_reify (EV_P) ...@@ -3424,7 +3451,8 @@ periodics_reify (EV_P)
/* simply recalculate all periodics */ /* simply recalculate all periodics */
/* TODO: maybe ensure that at least one event happens when jumping forward? */ /* TODO: maybe ensure that at least one event happens when jumping forward? */
static void noinline ecb_cold noinline ecb_cold
static void
periodics_reschedule (EV_P) periodics_reschedule (EV_P)
{ {
int i; int i;
...@@ -3447,7 +3475,8 @@ periodics_reschedule (EV_P) ...@@ -3447,7 +3475,8 @@ periodics_reschedule (EV_P)
#endif #endif
/* adjust all timers by a given offset */ /* adjust all timers by a given offset */
static void noinline ecb_cold noinline ecb_cold
static void
timers_reschedule (EV_P_ ev_tstamp adjust) timers_reschedule (EV_P_ ev_tstamp adjust)
{ {
int i; int i;
...@@ -3825,7 +3854,8 @@ ev_stop (EV_P_ W w) ...@@ -3825,7 +3854,8 @@ ev_stop (EV_P_ W w)
/*****************************************************************************/ /*****************************************************************************/
void noinline noinline
void
ev_io_start (EV_P_ ev_io *w) EV_THROW ev_io_start (EV_P_ ev_io *w) EV_THROW
{ {
int fd = w->fd; int fd = w->fd;
...@@ -3851,7 +3881,8 @@ ev_io_start (EV_P_ ev_io *w) EV_THROW ...@@ -3851,7 +3881,8 @@ ev_io_start (EV_P_ ev_io *w) EV_THROW
EV_FREQUENT_CHECK; EV_FREQUENT_CHECK;
} }
void noinline noinline
void
ev_io_stop (EV_P_ ev_io *w) EV_THROW ev_io_stop (EV_P_ ev_io *w) EV_THROW
{ {
clear_pending (EV_A_ (W)w); clear_pending (EV_A_ (W)w);
...@@ -3870,7 +3901,8 @@ ev_io_stop (EV_P_ ev_io *w) EV_THROW ...@@ -3870,7 +3901,8 @@ ev_io_stop (EV_P_ ev_io *w) EV_THROW
EV_FREQUENT_CHECK; EV_FREQUENT_CHECK;
} }
void noinline noinline
void
ev_timer_start (EV_P_ ev_timer *w) EV_THROW ev_timer_start (EV_P_ ev_timer *w) EV_THROW
{ {
if (expect_false (ev_is_active (w))) if (expect_false (ev_is_active (w)))
...@@ -3894,7 +3926,8 @@ ev_timer_start (EV_P_ ev_timer *w) EV_THROW ...@@ -3894,7 +3926,8 @@ ev_timer_start (EV_P_ ev_timer *w) EV_THROW
/*assert (("libev: internal timer heap corruption", timers [ev_active (w)] == (WT)w));*/ /*assert (("libev: internal timer heap corruption", timers [ev_active (w)] == (WT)w));*/
} }
void noinline noinline
void
ev_timer_stop (EV_P_ ev_timer *w) EV_THROW ev_timer_stop (EV_P_ ev_timer *w) EV_THROW
{ {
clear_pending (EV_A_ (W)w); clear_pending (EV_A_ (W)w);
...@@ -3924,7 +3957,8 @@ ev_timer_stop (EV_P_ ev_timer *w) EV_THROW ...@@ -3924,7 +3957,8 @@ ev_timer_stop (EV_P_ ev_timer *w) EV_THROW
EV_FREQUENT_CHECK; EV_FREQUENT_CHECK;
} }
void noinline noinline
void
ev_timer_again (EV_P_ ev_timer *w) EV_THROW ev_timer_again (EV_P_ ev_timer *w) EV_THROW
{ {
EV_FREQUENT_CHECK; EV_FREQUENT_CHECK;
...@@ -3958,7 +3992,8 @@ ev_timer_remaining (EV_P_ ev_timer *w) EV_THROW ...@@ -3958,7 +3992,8 @@ ev_timer_remaining (EV_P_ ev_timer *w) EV_THROW
} }
#if EV_PERIODIC_ENABLE #if EV_PERIODIC_ENABLE
void noinline noinline
void
ev_periodic_start (EV_P_ ev_periodic *w) EV_THROW ev_periodic_start (EV_P_ ev_periodic *w) EV_THROW
{ {
if (expect_false (ev_is_active (w))) if (expect_false (ev_is_active (w)))
...@@ -3988,7 +4023,8 @@ ev_periodic_start (EV_P_ ev_periodic *w) EV_THROW ...@@ -3988,7 +4023,8 @@ ev_periodic_start (EV_P_ ev_periodic *w) EV_THROW
/*assert (("libev: internal periodic heap corruption", ANHE_w (periodics [ev_active (w)]) == (WT)w));*/ /*assert (("libev: internal periodic heap corruption", ANHE_w (periodics [ev_active (w)]) == (WT)w));*/
} }
void noinline noinline
void
ev_periodic_stop (EV_P_ ev_periodic *w) EV_THROW ev_periodic_stop (EV_P_ ev_periodic *w) EV_THROW
{ {
clear_pending (EV_A_ (W)w); clear_pending (EV_A_ (W)w);
...@@ -4016,7 +4052,8 @@ ev_periodic_stop (EV_P_ ev_periodic *w) EV_THROW ...@@ -4016,7 +4052,8 @@ ev_periodic_stop (EV_P_ ev_periodic *w) EV_THROW
EV_FREQUENT_CHECK; EV_FREQUENT_CHECK;
} }
void noinline noinline
void
ev_periodic_again (EV_P_ ev_periodic *w) EV_THROW ev_periodic_again (EV_P_ ev_periodic *w) EV_THROW
{ {
/* TODO: use adjustheap and recalculation */ /* TODO: use adjustheap and recalculation */
...@@ -4031,7 +4068,8 @@ ev_periodic_again (EV_P_ ev_periodic *w) EV_THROW ...@@ -4031,7 +4068,8 @@ ev_periodic_again (EV_P_ ev_periodic *w) EV_THROW
#if EV_SIGNAL_ENABLE #if EV_SIGNAL_ENABLE
void noinline noinline
void
ev_signal_start (EV_P_ ev_signal *w) EV_THROW ev_signal_start (EV_P_ ev_signal *w) EV_THROW
{ {
if (expect_false (ev_is_active (w))) if (expect_false (ev_is_active (w)))
...@@ -4113,7 +4151,8 @@ ev_signal_start (EV_P_ ev_signal *w) EV_THROW ...@@ -4113,7 +4151,8 @@ ev_signal_start (EV_P_ ev_signal *w) EV_THROW
EV_FREQUENT_CHECK; EV_FREQUENT_CHECK;
} }
void noinline noinline
void
ev_signal_stop (EV_P_ ev_signal *w) EV_THROW ev_signal_stop (EV_P_ ev_signal *w) EV_THROW
{ {
clear_pending (EV_A_ (W)w); clear_pending (EV_A_ (W)w);
...@@ -4199,14 +4238,15 @@ ev_child_stop (EV_P_ ev_child *w) EV_THROW ...@@ -4199,14 +4238,15 @@ ev_child_stop (EV_P_ ev_child *w) EV_THROW
#define NFS_STAT_INTERVAL 30.1074891 /* for filesystems potentially failing inotify */ #define NFS_STAT_INTERVAL 30.1074891 /* for filesystems potentially failing inotify */
#define MIN_STAT_INTERVAL 0.1074891 #define MIN_STAT_INTERVAL 0.1074891
static void noinline stat_timer_cb (EV_P_ ev_timer *w_, int revents); noinline static void stat_timer_cb (EV_P_ ev_timer *w_, int revents);
#if EV_USE_INOTIFY #if EV_USE_INOTIFY
/* the * 2 is to allow for alignment padding, which for some reason is >> 8 */ /* the * 2 is to allow for alignment padding, which for some reason is >> 8 */
# define EV_INOTIFY_BUFSIZE (sizeof (struct inotify_event) * 2 + NAME_MAX) # define EV_INOTIFY_BUFSIZE (sizeof (struct inotify_event) * 2 + NAME_MAX)
static void noinline noinline
static void
infy_add (EV_P_ ev_stat *w) infy_add (EV_P_ ev_stat *w)
{ {
w->wd = inotify_add_watch (fs_fd, w->path, w->wd = inotify_add_watch (fs_fd, w->path,
...@@ -4280,7 +4320,8 @@ infy_add (EV_P_ ev_stat *w) ...@@ -4280,7 +4320,8 @@ infy_add (EV_P_ ev_stat *w)
if (ev_is_active (&w->timer)) ev_unref (EV_A); if (ev_is_active (&w->timer)) ev_unref (EV_A);
} }
static void noinline noinline
static void
infy_del (EV_P_ ev_stat *w) infy_del (EV_P_ ev_stat *w)
{ {
int slot; int slot;
...@@ -4297,7 +4338,8 @@ infy_del (EV_P_ ev_stat *w) ...@@ -4297,7 +4338,8 @@ infy_del (EV_P_ ev_stat *w)
inotify_rm_watch (fs_fd, wd); inotify_rm_watch (fs_fd, wd);
} }
static void noinline noinline
static void
infy_wd (EV_P_ int slot, int wd, struct inotify_event *ev) infy_wd (EV_P_ int slot, int wd, struct inotify_event *ev)
{ {
if (slot < 0) if (slot < 0)
...@@ -4343,7 +4385,8 @@ infy_cb (EV_P_ ev_io *w, int revents) ...@@ -4343,7 +4385,8 @@ infy_cb (EV_P_ ev_io *w, int revents)
} }
} }
inline_size void ecb_cold inline_size ecb_cold
void
ev_check_2625 (EV_P) ev_check_2625 (EV_P)
{ {
/* kernels < 2.6.25 are borked /* kernels < 2.6.25 are borked
...@@ -4451,7 +4494,8 @@ ev_stat_stat (EV_P_ ev_stat *w) EV_THROW ...@@ -4451,7 +4494,8 @@ ev_stat_stat (EV_P_ ev_stat *w) EV_THROW
w->attr.st_nlink = 1; w->attr.st_nlink = 1;
} }
static void noinline noinline
static void
stat_timer_cb (EV_P_ ev_timer *w_, int revents) stat_timer_cb (EV_P_ ev_timer *w_, int revents)
{ {
ev_stat *w = (ev_stat *)(((char *)w_) - offsetof (ev_stat, timer)); ev_stat *w = (ev_stat *)(((char *)w_) - offsetof (ev_stat, timer));
...@@ -4671,7 +4715,8 @@ ev_check_stop (EV_P_ ev_check *w) EV_THROW ...@@ -4671,7 +4715,8 @@ ev_check_stop (EV_P_ ev_check *w) EV_THROW
#endif #endif
#if EV_EMBED_ENABLE #if EV_EMBED_ENABLE
void noinline noinline
void
ev_embed_sweep (EV_P_ ev_embed *w) EV_THROW ev_embed_sweep (EV_P_ ev_embed *w) EV_THROW
{ {
ev_run (w->other, EVRUN_NOWAIT); ev_run (w->other, EVRUN_NOWAIT);
...@@ -4978,7 +5023,8 @@ ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, vo ...@@ -4978,7 +5023,8 @@ ev_once (EV_P_ int fd, int events, ev_tstamp timeout, void (*cb)(int revents, vo
/*****************************************************************************/ /*****************************************************************************/
#if EV_WALK_ENABLE #if EV_WALK_ENABLE
void ecb_cold ecb_cold
void
ev_walk (EV_P_ int types, void (*cb)(EV_P_ int type, void *w)) EV_THROW ev_walk (EV_P_ int types, void (*cb)(EV_P_ int type, void *w)) EV_THROW
{ {
int i, j; int i, j;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment