Browse Source

*** empty log message ***

master
Marc Alexander Lehmann 9 years ago
parent
commit
db052698de
3 changed files with 29 additions and 1 deletions
  1. +1
    -1
      Changes
  2. +15
    -0
      ev.c
  3. +13
    -0
      ev.pod

+ 1
- 1
Changes View File

@ -2,11 +2,11 @@ Revision history for libev, a high-performance and full-featured event loop.
TODO: ev_loop_wakeup
TODO: EV_NO_THREADS/NO_SMP and/or EV_USE_PTHREADS or so. also document.
TODO: EV_STANDALONE == NO_HASSEL (do not use clock_gettime in ev_standalone)
4.11
- INCOMPATIBLE CHANGE: ev_timer_again now clears the pending status, as
was documented already, but not implemented in the repeating case.
- new compiletime symbols: EV_NO_SMP and EV_NO_THREADS.
- fix a race where the workaround against the epoll fork bugs
caused signals to not be handled anymore.
- correct backend_fudge for most backends, and implement a windows


+ 15
- 0
ev.c View File

@ -185,6 +185,17 @@
# include "ev.h"
#endif
#if EV_NO_THREADS
# undef EV_NO_SMP
# define EV_NO_SMP 1
# undef ECB_NO_THREADS
# define ECB_NO_THREADS 1
#endif
#if EV_NO_SMP
# undef EV_NO_SMP
# define ECB_NO_SMP 1
#endif
#ifndef _WIN32
# include <sys/time.h>
# include <sys/wait.h>
@ -536,6 +547,10 @@ struct signalfd_siginfo
/* ECB_NO_THREADS - ecb is not used by multiple threads, ever */
/* ECB_NO_SMP - ecb might be used in multiple threads, but only on a single cpu */
#if ECB_NO_THREADS
# define ECB_NO_SMP 1
#endif
#if ECB_NO_THREADS || ECB_NO_SMP
#define ECB_MEMORY_FENCE do { } while (0)
#endif


+ 13
- 0
ev.pod View File

@ -4506,6 +4506,19 @@ interface to speed up C<ev_stat> watchers. Its actual availability will
be detected at runtime. If undefined, it will be enabled if the headers
indicate GNU/Linux + Glibc 2.4 or newer, otherwise disabled.
=item EV_NO_SMP
If defined to be C<1>, libev will assume that memory is always coherent
between threads, that is, threads can be used, but threads never run on
different cpus (or different cpu cores). This reduces dependencies
and makes libev faster.
=item EV_NO_THREADS
If defined to be C<1>, libev will assume that it will never be called
from different threads, which is a stronger assumption than C<EV_NO_SMP>,
above. This reduces dependencies and makes libev faster.
=item EV_ATOMIC_T
Libev requires an integer type (suitable for storing C<0> or C<1>) whose


Loading…
Cancel
Save