diff options
author | Sverker Eriksson <[email protected]> | 2017-05-05 19:47:07 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2017-05-05 19:47:07 +0200 |
commit | 3f0e95a08394e92a58f99f99a94f9349e35842dd (patch) | |
tree | bd7f5c07c03bec93acbeea4e2fe23da4af838e31 /erts/emulator/beam/io.c | |
parent | 4f03eba5294f1c1bc922b07f1267e6b0099fd4b5 (diff) | |
download | otp-3f0e95a08394e92a58f99f99a94f9349e35842dd.tar.gz otp-3f0e95a08394e92a58f99f99a94f9349e35842dd.tar.bz2 otp-3f0e95a08394e92a58f99f99a94f9349e35842dd.zip |
erts: Unbreak --enable-lock-checking --enable-lock-counter
both together.
Broken in OTP-20.0-rc1 by 7d161f5b475575bd79bd90977b3a79334a8ec658.
Diffstat (limited to 'erts/emulator/beam/io.c')
-rw-r--r-- | erts/emulator/beam/io.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/erts/emulator/beam/io.c b/erts/emulator/beam/io.c index bf89740fda..93a5ed4397 100644 --- a/erts/emulator/beam/io.c +++ b/erts/emulator/beam/io.c @@ -260,10 +260,12 @@ static ERTS_INLINE void port_init_instr(Port *prt if (!prt->drv_ptr->lock) { char *lock_str = "port_lock"; #ifdef ERTS_ENABLE_LOCK_COUNT - if (!(erts_lcnt_rt_options & ERTS_LCNT_OPT_PORTLOCK)) - lock_str = NULL; + Uint16 opt = ((erts_lcnt_rt_options & ERTS_LCNT_OPT_PORTLOCK) + ? 0 : ERTS_LCNT_LT_DISABLE); +#else + Uint16 opt = 0; #endif - erts_mtx_init_locked_x(prt->lock, lock_str, id); + erts_mtx_init_locked_x_opt(prt->lock, lock_str, id, opt); } #endif erts_port_task_init_sched(&prt->sched, id); |