diff options
author | Rickard Green <[email protected]> | 2012-12-18 14:57:35 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2012-12-18 14:57:35 +0100 |
commit | 955d2f9dad5cedc25afb8dd7893f697f4f6f26a9 (patch) | |
tree | 0e5963cf6f5af6ce48da50f4109f1334c3ff9b25 /erts/emulator/beam/erl_port.h | |
parent | 5b1e008c8a02d670e07d9eaccd80b28a22bdbc65 (diff) | |
parent | fe6cac45c744ed2937e9905f779244d93142f2db (diff) | |
download | otp-955d2f9dad5cedc25afb8dd7893f697f4f6f26a9.tar.gz otp-955d2f9dad5cedc25afb8dd7893f697f4f6f26a9.tar.bz2 otp-955d2f9dad5cedc25afb8dd7893f697f4f6f26a9.zip |
Merge branch 'rickard/r16/port-optimizations/OTP-10336'
* rickard/r16/port-optimizations/OTP-10336:
Fix driver_monitor_process() ASSERT
Fix scheduled port link operation
Fix aborts of port tasks when terminating ports
Diffstat (limited to 'erts/emulator/beam/erl_port.h')
-rw-r--r-- | erts/emulator/beam/erl_port.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_port.h b/erts/emulator/beam/erl_port.h index f4d73e716a..fb07f3d5bc 100644 --- a/erts/emulator/beam/erl_port.h +++ b/erts/emulator/beam/erl_port.h @@ -430,7 +430,7 @@ ERTS_GLB_INLINE void erts_port_release(Port *); ERTS_GLB_INLINE Port *erts_thr_id2port_sflgs(Eterm id, Uint32 invalid_sflgs); ERTS_GLB_INLINE void erts_thr_port_release(Port *prt); #endif -ERTS_GLB_INLINE Port *erts_thr_drvport2port_raw(ErlDrvPort); +ERTS_GLB_INLINE Port *erts_thr_drvport2port_raw(ErlDrvPort, int); ERTS_GLB_INLINE Port *erts_drvport2port_raw(ErlDrvPort drvport); ERTS_GLB_INLINE Port *erts_drvport2port(ErlDrvPort, erts_aint32_t *); ERTS_GLB_INLINE Port *erts_drvportid2port(Eterm); @@ -622,7 +622,7 @@ erts_thr_port_release(Port *prt) #endif ERTS_GLB_INLINE Port* -erts_thr_drvport2port_raw(ErlDrvPort drvport) +erts_thr_drvport2port_raw(ErlDrvPort drvport, int lock_pdl) { #if ERTS_ENABLE_LOCK_CHECK int emu_thread = erts_lc_is_emu_thr(); @@ -631,6 +631,8 @@ erts_thr_drvport2port_raw(ErlDrvPort drvport) return NULL; else { Port *prt = (Port *) drvport; + if (lock_pdl && prt->port_data_lock) + driver_pdl_lock(prt->port_data_lock); #if ERTS_ENABLE_LOCK_CHECK if (!ERTS_IS_CRASH_DUMPING) { if (emu_thread) { |