*** empty log message ***

This commit is contained in:
Marc Alexander Lehmann 2010-03-16 17:11:48 +00:00
parent 97e7f2bf86
commit 50f9204ab9
5 changed files with 48 additions and 17 deletions

View File

@ -1,6 +1,7 @@
Revision history for libev, a high-performance and full-featured event loop.
TODO: ABI??? API????? Changes???
TODO: win32 write() to socket for signal handling
- ev_embed_stop did not correctly stop the watcher (very good
testcase by Vladimir Timofeev).
- applied win32 fixes by Michael Lenaghan (also James Mansion).
@ -19,6 +20,8 @@ TODO: ABI??? API????? Changes???
- new EV_CHILD_ENABLE and EV_SIGNAL_ENABLE configurable settings.
- update libev.m4 HAVE_CLOCK_SYSCALL test for newwer glibcs.
- add section on accept() problems to the manpage.
- rename EV_TIMEOUT to EV_TIMER.
- switch to two-digit minor version.
3.9 Thu Dec 31 07:59:59 CET 2009
- signalfd is no longer used by default and has to be requested

View File

@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS = foreign no-dependencies
VERSION_INFO = 3:0
VERSION_INFO = 4:0
EXTRA_DIST = LICENSE Changes libev.m4 autogen.sh \
ev_vars.h ev_wrap.h \

View File

@ -1,7 +1,7 @@
AC_INIT
AC_CONFIG_SRCDIR([ev_epoll.c])
AM_INIT_AUTOMAKE(libev,3.9) dnl also update ev.h!
AM_INIT_AUTOMAKE(libev,4.00) dnl also update ev.h!
AC_CONFIG_HEADERS([config.h])
AM_MAINTAINER_MODE

22
ev.h
View File

@ -47,7 +47,7 @@ extern "C" {
/*****************************************************************************/
#ifndef EV_FEATURES
# define EV_FEATURES 0x3f
# define EV_FEATURES 0x7f
#endif
#define EV_FEATURE_CODE ((EV_FEATURES) & 1)
@ -58,7 +58,7 @@ extern "C" {
#define EV_FEATURE_BACKENDS ((EV_FEATURES) & 32)
#define EV_FEATURE_OS ((EV_FEATURES) & 64)
/* these priorities are inclusive, higher priorities will be called earlier */
/* these priorities are inclusive, higher priorities will be invoked earlier */
#ifndef EV_MINPRI
# define EV_MINPRI (EV_FEATURE_CONFIG ? -2 : 0)
#endif
@ -171,8 +171,15 @@ struct ev_loop;
# define EV_INLINE static
#endif
#ifndef EV_PROTOTYPES
# define EV_PROTOTYPES 1
#endif
/*****************************************************************************/
#define EV_VERSION_MAJOR 4
#define EV_VERSION_MINOR 0
/* eventmask, revents, events... */
#define EV_UNDEF -1 /* guaranteed to be invalid */
#define EV_NONE 0x00 /* no events */
@ -199,12 +206,6 @@ struct ev_loop;
#ifndef EV_COMMON
# define EV_COMMON void *data;
#endif
#ifndef EV_PROTOTYPES
# define EV_PROTOTYPES 1
#endif
#define EV_VERSION_MAJOR 3
#define EV_VERSION_MINOR 9
#ifndef EV_CB_DECLARE
# define EV_CB_DECLARE(type) void (*cb)(EV_P_ struct type *w, int revents);
@ -213,6 +214,9 @@ struct ev_loop;
# define EV_CB_INVOKE(watcher,revents) (watcher)->cb (EV_A_ (watcher), (revents))
#endif
/* not official, do not use */
#define EV_CB(type,name) void name (EV_P_ struct ev_ ## type *w, int revents)
/*
* struct member types:
* private: you may look at them, but not change them,
@ -232,7 +236,7 @@ struct ev_loop;
#if EV_MINPRI == EV_MAXPRI
# define EV_DECL_PRIORITY
#else
#elif !defined (EV_DECL_PRIORITY)
# define EV_DECL_PRIORITY int priority;
#endif

36
ev.pod
View File

@ -1034,7 +1034,7 @@ are:
The file descriptor in the C<ev_io> watcher has become readable and/or
writable.
=item C<EV_TIMEOUT>
=item C<EV_TIMER>
The C<ev_timer> watcher has timed out.
@ -1766,7 +1766,7 @@ callback, which will "do the right thing" and start the timer:
ev_init (timer, callback);
last_activity = ev_now (loop);
callback (loop, timer, EV_TIMEOUT);
callback (loop, timer, EV_TIMER);
And when there is some activity, simply store the current time in
C<last_activity>, no libev calls at all:
@ -3181,9 +3181,9 @@ If C<timeout> is less than 0, then no timeout watcher will be
started. Otherwise an C<ev_timer> watcher with after = C<timeout> (and
repeat = 0) will be started. C<0> is a valid timeout.
The callback has the type C<void (*cb)(int revents, void *arg)> and gets
The callback has the type C<void (*cb)(int revents, void *arg)> and is
passed an C<revents> set like normal event callbacks (a combination of
C<EV_ERROR>, C<EV_READ>, C<EV_WRITE> or C<EV_TIMEOUT>) and the C<arg>
C<EV_ERROR>, C<EV_READ>, C<EV_WRITE> or C<EV_TIMER>) and the C<arg>
value passed to C<ev_once>. Note that it is possible to receive I<both>
a timeout and an io event at the same time - you probably should give io
events precedence.
@ -3194,7 +3194,7 @@ Example: wait up to ten seconds for data to appear on STDIN_FILENO.
{
if (revents & EV_READ)
/* stdin might have data for us, joy! */;
else if (revents & EV_TIMEOUT)
else if (revents & EV_TIMER)
/* doh, nothing entered */;
}
@ -4623,6 +4623,30 @@ involves iterating over all running async watchers or all signal numbers.
=back
=head1 PORTING FROM 3.X TO 4.X
The major version 4 introduced some minor incompatible changes to the API.
=over 4
=item C<EV_TIMEOUT> replaced by C<EV_TIMER> in C<revents>
This is a simple rename - all other watcher types use their name
as revents flag, and now C<ev_timer> does, too.
Both C<EV_TIMER> and C<EV_TIMEOUT> symbols were present in 3.x versions
and continue to be present for the forseeable future, so this is mostly a
documentation change.
=item C<EV_MINIMAL> mechanism replaced by C<EV_FEATURES>
The preprocessor symbol C<EV_MINIMAL> has been replaced by a different
mechanism, C<EV_FEATURES>. Programs using C<EV_MINIMAL> usually compile
and work, but the library code will of course be larger.
=back
=head1 GLOSSARY
=over 4
@ -4653,7 +4677,7 @@ for reading on a file descriptor, time having passed or simply not having
any other events happening anymore.
In libev, events are represented as single bits (such as C<EV_READ> or
C<EV_TIMEOUT>).
C<EV_TIMER>).
=item event library