ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev.c
(Generate patch)

Comparing libev/ev.c (file contents):
Revision 1.401 by root, Tue Dec 20 04:08:35 2011 UTC vs.
Revision 1.402 by sf-exg, Tue Dec 20 10:34:10 2011 UTC

876 876
877#if ECB_MEMORY_FENCE_NEEDS_PTHREADS 877#if ECB_MEMORY_FENCE_NEEDS_PTHREADS
878/* if your architecture doesn't need memory fences, e.g. because it is 878/* if your architecture doesn't need memory fences, e.g. because it is
879 * single-cpu/core, or if you use libev in a project that doesn't use libev 879 * single-cpu/core, or if you use libev in a project that doesn't use libev
880 * from multiple threads, then you can define ECB_AVOID_PTHREADS when compiling 880 * from multiple threads, then you can define ECB_AVOID_PTHREADS when compiling
881 * libev, in which casess the memory fences become nops. 881 * libev, in which cases the memory fences become nops.
882 * alternatively, you can remove this #error and link against libpthread, 882 * alternatively, you can remove this #error and link against libpthread,
883 * which will then provide the memory fences. 883 * which will then provide the memory fences.
884 */ 884 */
885# error "memory fences not defined for your architecture, please report" 885# error "memory fences not defined for your architecture, please report"
886#endif 886#endif
1193 #undef VAR 1193 #undef VAR
1194 }; 1194 };
1195 #include "ev_wrap.h" 1195 #include "ev_wrap.h"
1196 1196
1197 static struct ev_loop default_loop_struct; 1197 static struct ev_loop default_loop_struct;
1198 EV_API_DECL struct ev_loop *ev_default_loop_ptr = 0; /* needs to be initialised to make it a defintiino despite extern */ 1198 EV_API_DECL struct ev_loop *ev_default_loop_ptr = 0; /* needs to be initialised to make it a definition despite extern */
1199 1199
1200#else 1200#else
1201 1201
1202 EV_API_DECL ev_tstamp ev_rt_now = 0; /* needs to be initialised to make it a defintiino despite extern */ 1202 EV_API_DECL ev_tstamp ev_rt_now = 0; /* needs to be initialised to make it a definition despite extern */
1203 #define VAR(name,decl) static decl; 1203 #define VAR(name,decl) static decl;
1204 #include "ev_vars.h" 1204 #include "ev_vars.h"
1205 #undef VAR 1205 #undef VAR
1206 1206
1207 static int ev_default_loop_ptr; 1207 static int ev_default_loop_ptr;
2991#endif 2991#endif
2992 assert ((loop_done = EVBREAK_RECURSE, 1)); /* assert for side effect */ 2992 assert ((loop_done = EVBREAK_RECURSE, 1)); /* assert for side effect */
2993 backend_poll (EV_A_ waittime); 2993 backend_poll (EV_A_ waittime);
2994 assert ((loop_done = EVBREAK_CANCEL, 1)); /* assert for side effect */ 2994 assert ((loop_done = EVBREAK_CANCEL, 1)); /* assert for side effect */
2995 2995
2996 pipe_write_wanted = 0; /* just an optimsiation, no fence needed */ 2996 pipe_write_wanted = 0; /* just an optimisation, no fence needed */
2997 2997
2998 if (pipe_write_skipped) 2998 if (pipe_write_skipped)
2999 { 2999 {
3000 assert (("libev: pipe_w not active, but pipe not written", ev_is_active (&pipe_w))); 3000 assert (("libev: pipe_w not active, but pipe not written", ev_is_active (&pipe_w)));
3001 ev_feed_event (EV_A_ &pipe_w, EV_CUSTOM); 3001 ev_feed_event (EV_A_ &pipe_w, EV_CUSTOM);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines