From 483161dd3e05d5d4285bae90ac625e761c7b8214 Mon Sep 17 00:00:00 2001 From: Adrian Mangeac Date: Mon, 3 Mar 2014 11:18:52 +0100 Subject: ose: Restore the owner of the signal As any scheduler process can consume any message we have to make sure that the message is owned by the scheduler before returning it in erl_drv_ose_get_signal. --- erts/emulator/sys/ose/erl_poll.c | 1 + erts/emulator/sys/ose/sys.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/emulator') diff --git a/erts/emulator/sys/ose/erl_poll.c b/erts/emulator/sys/ose/erl_poll.c index ca1ed6e53a..f0a9097252 100644 --- a/erts/emulator/sys/ose/erl_poll.c +++ b/erts/emulator/sys/ose/erl_poll.c @@ -737,6 +737,7 @@ union SIGNAL *erl_drv_ose_get_signal(ErlDrvEvent drv_ev) { ev->msgs = msg->next; ethr_mutex_unlock(&ev->mtx); erts_free(ERTS_ALC_T_FD_SIG_LIST,msg); + restore(sig); return sig; } } diff --git a/erts/emulator/sys/ose/sys.c b/erts/emulator/sys/ose/sys.c index c892cc69c7..e3041ff1ca 100644 --- a/erts/emulator/sys/ose/sys.c +++ b/erts/emulator/sys/ose/sys.c @@ -213,7 +213,6 @@ static volatile int children_died; /* When we have several schedulers, we need to make sure * that scheduler issuing aio_dispatch() is the owner on the signal */ #define DISPATCH_AIO(sig) do { \ - restore(sig); \ aio_dispatch(sig); \ } while(0) -- cgit v1.2.3