summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root>2012-05-29 20:44:39 +0000
committerroot <root>2012-05-29 20:44:39 +0000
commit44278a1731090cbf47eb569fb12123fde976eed5 (patch)
treee37412989644674111ba449606c03576fa51da38
parente3dff26cb74e12d5f8f4702782294ed481cd78e1 (diff)
*** empty log message ***
-rw-r--r--ev.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/ev.c b/ev.c
index 8f0eaa0..eab77fa 100644
--- a/ev.c
+++ b/ev.c
@@ -1851,7 +1851,6 @@ evpipe_write (EV_P_ EV_ATOMIC_T *flag)
return;
*flag = 1;
-
ECB_MEMORY_FENCE_RELEASE; /* make sure flag is visible before the wakeup */
pipe_write_skipped = 1;
@@ -1862,7 +1861,8 @@ evpipe_write (EV_P_ EV_ATOMIC_T *flag)
{
int old_errno;
- pipe_write_skipped = 0; /* just an optimisation, no fence needed */
+ pipe_write_skipped = 0;
+ ECB_MEMORY_FENCE_RELEASE;
old_errno = errno; /* save errno because write will clobber it */
@@ -1931,7 +1931,7 @@ pipecb (EV_P_ ev_io *iow, int revents)
{
sig_pending = 0;
- ECB_MEMORY_FENCE_RELEASE;
+ ECB_MEMORY_FENCE;
for (i = EV_NSIG - 1; i--; )
if (expect_false (signals [i].pending))
@@ -1944,12 +1944,13 @@ pipecb (EV_P_ ev_io *iow, int revents)
{
async_pending = 0;
- ECB_MEMORY_FENCE_RELEASE;
+ ECB_MEMORY_FENCE;
for (i = asynccnt; i--; )
if (asyncs [i]->sent)
{
asyncs [i]->sent = 0;
+ ECB_MEMORY_FENCE_RELEASE;
ev_feed_event (EV_A_ asyncs [i], EV_ASYNC);
}
}
@@ -2004,6 +2005,7 @@ ev_feed_signal_event (EV_P_ int signum) EV_THROW
#endif
signals [signum].pending = 0;
+ MEMORY_FENCE_RELEASE;
for (w = signals [signum].head; w; w = w->next)
ev_feed_event (EV_A_ (W)w, EV_SIGNAL);