mirror of /home/gitosis/repositories/libev.git
*** empty log message ***
This commit is contained in:
parent
33ad8a2c56
commit
c829e39d31
2
Changes
2
Changes
|
@ -17,6 +17,8 @@ TODO: document requirements for function pointers and calling conventions.
|
|||
|
||||
- prefer noexcept over throw () with C++ 11.
|
||||
- update ecb.h due to incompatibilities with c11.
|
||||
- fix a potentgial aliasing issue when reading and writing
|
||||
watcher callbacks.
|
||||
|
||||
4.19 Thu Sep 25 08:18:25 CEST 2014
|
||||
- ev.h wasn't valid C++ anymore, which tripped compilers other than
|
||||
|
|
9
ev.h
9
ev.h
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* libev native API header
|
||||
*
|
||||
* Copyright (c) 2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann <libev@schmorp.de>
|
||||
* Copyright (c) 2007,2008,2009,2010,2011,2012,2015 Marc Alexander Lehmann <libev@schmorp.de>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modifica-
|
||||
|
@ -152,6 +152,8 @@ EV_CPP(extern "C" {)
|
|||
|
||||
typedef double ev_tstamp;
|
||||
|
||||
#include <string.h> /* for memmove */
|
||||
|
||||
#ifndef EV_ATOMIC_T
|
||||
# include <signal.h>
|
||||
# define EV_ATOMIC_T sig_atomic_t volatile
|
||||
|
@ -719,7 +721,8 @@ EV_API_DECL void ev_resume (EV_P) EV_THROW;
|
|||
#define ev_is_pending(ev) (0 + ((ev_watcher *)(void *)(ev))->pending) /* ro, true when watcher is waiting for callback invocation */
|
||||
#define ev_is_active(ev) (0 + ((ev_watcher *)(void *)(ev))->active) /* ro, true when the watcher has been started */
|
||||
|
||||
#define ev_cb(ev) (ev)->cb /* rw */
|
||||
#define ev_cb_(ev) (ev)->cb /* rw */
|
||||
#define ev_cb(ev) (memmove (&ev_cb_ (ev), &((ev_watcher *)(ev))->cb, sizeof (ev_cb_ (ev))), (ev)->cb)
|
||||
|
||||
#if EV_MINPRI == EV_MAXPRI
|
||||
# define ev_priority(ev) ((ev), EV_MINPRI)
|
||||
|
@ -732,7 +735,7 @@ EV_API_DECL void ev_resume (EV_P) EV_THROW;
|
|||
#define ev_periodic_at(ev) (+((ev_watcher_time *)(ev))->at)
|
||||
|
||||
#ifndef ev_set_cb
|
||||
# define ev_set_cb(ev,cb_) ev_cb (ev) = (cb_)
|
||||
# define ev_set_cb(ev,cb_) (ev_cb_ (ev) = (cb_), memmove (&((ev_watcher *)(ev))->cb, &ev_cb_ (ev), sizeof (ev_cb_ (ev))))
|
||||
#endif
|
||||
|
||||
/* stopping (enabling, adding) a watcher does nothing if it is already running */
|
||||
|
|
2
ev.pod
2
ev.pod
|
@ -3902,7 +3902,7 @@ files, F<my_ev.h> and F<my_ev.c> that include the respective libev files:
|
|||
|
||||
// my_ev.h
|
||||
#define EV_CB_DECLARE(type) struct my_coro *cb;
|
||||
#define EV_CB_INVOKE(watcher) switch_to ((watcher)->cb);
|
||||
#define EV_CB_INVOKE(watcher) switch_to ((watcher)->cb)
|
||||
#include "../libev/ev.h"
|
||||
|
||||
// my_ev.c
|
||||
|
|
Loading…
Reference in New Issue