diff options
author | Sverker Eriksson <sverker@erlang.org> | 2017-05-05 19:47:07 +0200 |
---|---|---|
committer | Sverker Eriksson <sverker@erlang.org> | 2017-05-05 19:47:07 +0200 |
commit | 3f0e95a08394e92a58f99f99a94f9349e35842dd (patch) | |
tree | bd7f5c07c03bec93acbeea4e2fe23da4af838e31 /erts/emulator/beam/erl_port_task.h | |
parent | 4f03eba5294f1c1bc922b07f1267e6b0099fd4b5 (diff) | |
download | erlang-3f0e95a08394e92a58f99f99a94f9349e35842dd.tar.gz |
erts: Unbreak --enable-lock-checking --enable-lock-counter
both together.
Broken in OTP-20.0-rc1 by 7d161f5b475575bd79bd90977b3a79334a8ec658.
Diffstat (limited to 'erts/emulator/beam/erl_port_task.h')
-rw-r--r-- | erts/emulator/beam/erl_port_task.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_port_task.h b/erts/emulator/beam/erl_port_task.h index e3550e878e..858ddfe029 100644 --- a/erts/emulator/beam/erl_port_task.h +++ b/erts/emulator/beam/erl_port_task.h @@ -189,11 +189,13 @@ erts_port_task_init_sched(ErtsPortTaskSched *ptsp, Eterm instr_id) erts_smp_atomic32_init_nob(&ptsp->flags, 0); #ifdef ERTS_SMP #ifdef ERTS_ENABLE_LOCK_COUNT - if (!(erts_lcnt_rt_options & ERTS_LCNT_OPT_PORTLOCK)) - lock_str = NULL; -#endif + erts_mtx_init_x_opt(&ptsp->mtx, lock_str, instr_id, + ((erts_lcnt_rt_options & ERTS_LCNT_OPT_PORTLOCK) + ? 0 : ERTS_LCNT_LT_DISABLE)); +#else erts_mtx_init_x(&ptsp->mtx, lock_str, instr_id); #endif +#endif } ERTS_GLB_INLINE void |