… | |
… | |
1844 | } |
1844 | } |
1845 | |
1845 | |
1846 | inline_speed void |
1846 | inline_speed void |
1847 | evpipe_write (EV_P_ EV_ATOMIC_T *flag) |
1847 | evpipe_write (EV_P_ EV_ATOMIC_T *flag) |
1848 | { |
1848 | { |
|
|
1849 | ECB_MEMORY_FENCE; /* push out the write before this function was called, acquire flag */ |
|
|
1850 | |
1849 | if (expect_true (*flag)) |
1851 | if (expect_true (*flag)) |
1850 | return; |
1852 | return; |
1851 | |
1853 | |
1852 | *flag = 1; |
1854 | *flag = 1; |
1853 | |
1855 | |
… | |
… | |
1912 | } |
1914 | } |
1913 | } |
1915 | } |
1914 | |
1916 | |
1915 | pipe_write_skipped = 0; |
1917 | pipe_write_skipped = 0; |
1916 | |
1918 | |
|
|
1919 | ECB_MEMORY_FENCE; /* push out skipped, acquire flags */ |
|
|
1920 | |
1917 | #if EV_SIGNAL_ENABLE |
1921 | #if EV_SIGNAL_ENABLE |
1918 | if (sig_pending) |
1922 | if (sig_pending) |
1919 | { |
1923 | { |
1920 | sig_pending = 0; |
1924 | sig_pending = 0; |
|
|
1925 | |
|
|
1926 | ECB_MEMORY_FENCE_RELEASE; |
1921 | |
1927 | |
1922 | for (i = EV_NSIG - 1; i--; ) |
1928 | for (i = EV_NSIG - 1; i--; ) |
1923 | if (expect_false (signals [i].pending)) |
1929 | if (expect_false (signals [i].pending)) |
1924 | ev_feed_signal_event (EV_A_ i + 1); |
1930 | ev_feed_signal_event (EV_A_ i + 1); |
1925 | } |
1931 | } |
… | |
… | |
1927 | |
1933 | |
1928 | #if EV_ASYNC_ENABLE |
1934 | #if EV_ASYNC_ENABLE |
1929 | if (async_pending) |
1935 | if (async_pending) |
1930 | { |
1936 | { |
1931 | async_pending = 0; |
1937 | async_pending = 0; |
|
|
1938 | |
|
|
1939 | ECB_MEMORY_FENCE_RELEASE; |
1932 | |
1940 | |
1933 | for (i = asynccnt; i--; ) |
1941 | for (i = asynccnt; i--; ) |
1934 | if (asyncs [i]->sent) |
1942 | if (asyncs [i]->sent) |
1935 | { |
1943 | { |
1936 | asyncs [i]->sent = 0; |
1944 | asyncs [i]->sent = 0; |