aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/sys/win32
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2011-05-10 20:43:11 +0200
committerRickard Green <[email protected]>2011-05-13 14:23:20 +0200
commit425e282be62f8205b1ba262b112f38688b421c49 (patch)
tree7aee86f0d249330f02b84440771f066e0973b272 /erts/emulator/sys/win32
parent673f5d1bf684f15ac5526d8a21552eca9a0c9052 (diff)
downloadotp-425e282be62f8205b1ba262b112f38688b421c49.tar.gz
otp-425e282be62f8205b1ba262b112f38688b421c49.tar.bz2
otp-425e282be62f8205b1ba262b112f38688b421c49.zip
Ensure quick break
Make sure that we don't have to wait in poll before break handling is done.
Diffstat (limited to 'erts/emulator/sys/win32')
-rw-r--r--erts/emulator/sys/win32/erl_poll.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/erts/emulator/sys/win32/erl_poll.c b/erts/emulator/sys/win32/erl_poll.c
index 7662f190ef..074e2e247f 100644
--- a/erts/emulator/sys/win32/erl_poll.c
+++ b/erts/emulator/sys/win32/erl_poll.c
@@ -693,6 +693,7 @@ static void *break_waiter(void *param)
ResetEvent(harr[0]);
erts_mtx_lock(&break_waiter_lock);
erts_atomic32_set(&break_waiter_state,BREAK_WAITER_GOT_BREAK);
+ ERTS_THR_MEMORY_BARRIER;
SetEvent(break_happened_event);
erts_mtx_unlock(&break_waiter_lock);
break;
@@ -700,6 +701,7 @@ static void *break_waiter(void *param)
ResetEvent(harr[1]);
erts_mtx_lock(&break_waiter_lock);
erts_atomic32_set(&break_waiter_state,BREAK_WAITER_GOT_HALT);
+ ERTS_THR_MEMORY_BARRIER;
SetEvent(break_happened_event);
erts_mtx_unlock(&break_waiter_lock);
break;