diff options
author | Lukas Larsson <[email protected]> | 2014-02-23 18:25:59 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2014-02-24 15:16:07 +0100 |
commit | 2bf4f22a9488d94ac1fc3c72a4e9d84151744004 (patch) | |
tree | 75ad289dcfad651889c0ad800e64f89bc8382324 /erts/include/internal | |
parent | 0f9fd47d9141846950bd439d8401f8a759068136 (diff) | |
download | otp-2bf4f22a9488d94ac1fc3c72a4e9d84151744004.tar.gz otp-2bf4f22a9488d94ac1fc3c72a4e9d84151744004.tar.bz2 otp-2bf4f22a9488d94ac1fc3c72a4e9d84151744004.zip |
ose: Yielding the cpu is done "the OSE" way
Diffstat (limited to 'erts/include/internal')
-rw-r--r-- | erts/include/internal/ethread.h | 6 |
1 files changed, 3 insertions, 3 deletions
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 |