From 2bf4f22a9488d94ac1fc3c72a4e9d84151744004 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Sun, 23 Feb 2014 18:25:59 +0100 Subject: ose: Yielding the cpu is done "the OSE" way --- erts/include/internal/ethread.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'erts') diff --git a/erts/include/internal/ethread.h b/erts/include/internal/ethread.h index ebddfc8ba8..58b4ef55b6 100644 --- a/erts/include/internal/ethread.h +++ b/erts/include/internal/ethread.h @@ -417,9 +417,9 @@ extern ethr_runtime_t ethr_runtime__; # endif #elif defined(ETHR_OSE_THREADS) # ifndef ETHR_SPIN_BODY -# define ETHR_SPIN_BODY delay(1) +# define ETHR_SPIN_BODY set_pri(get_pri(current_process())) # else -# error "Have to use delay on OSE" +# error "OSE should use set_pri(get_pri(current_process()))" # endif #endif @@ -452,7 +452,7 @@ extern ethr_runtime_t ethr_runtime__; # define ETHR_YIELD() (pthread_yield(), 0) # endif # elif defined(ETHR_OSE_THREADS) -# define ETHR_YIELD() (delay(1), 0) +# define ETHR_YIELD() (set_pri(get_pri(current_process())), 0) # else # define ETHR_YIELD() (ethr_compiler_barrier(), 0) # endif -- cgit v1.2.3