aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_thr_progress.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2016-08-29 18:39:21 +0200
committerRickard Green <[email protected]>2016-08-29 18:39:21 +0200
commitb815d568e2e43d96698dbb8de6b993d55c1b14a0 (patch)
treea2ecbfa7529ea14fb6376882c8bcbcbfc36509b8 /erts/emulator/beam/erl_thr_progress.c
parent5006f1e0c45d4e9b888b2c0ca48130049d33074c (diff)
parentc429c3d042ba274d4225a6d79b2f1df8cfd19983 (diff)
downloadotp-b815d568e2e43d96698dbb8de6b993d55c1b14a0.tar.gz
otp-b815d568e2e43d96698dbb8de6b993d55c1b14a0.tar.bz2
otp-b815d568e2e43d96698dbb8de6b993d55c1b14a0.zip
Merge branch 'rickard/ds-trace/OTP-13822' into maint
* rickard/ds-trace/OTP-13822: Fix tracing of processes executing dirty
Diffstat (limited to 'erts/emulator/beam/erl_thr_progress.c')
-rw-r--r--erts/emulator/beam/erl_thr_progress.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_thr_progress.c b/erts/emulator/beam/erl_thr_progress.c
index 21938e7684..26d71f573f 100644
--- a/erts/emulator/beam/erl_thr_progress.c
+++ b/erts/emulator/beam/erl_thr_progress.c
@@ -969,8 +969,10 @@ erts_thr_progress_unmanaged_continue__(ErtsThrPrgrDelayHandle handle)
#ifdef ERTS_ENABLE_LOCK_CHECK
ErtsThrPrgrData *tpd = perhaps_thr_prgr_data(NULL);
ERTS_LC_ASSERT(tpd && tpd->is_delaying);
- tpd->is_delaying = 0;
- return_tmp_thr_prgr_data(tpd);
+ tpd->is_delaying--;
+ ASSERT(tpd->is_delaying >= 0);
+ if (!tpd->is_delaying)
+ return_tmp_thr_prgr_data(tpd);
#endif
ASSERT(!erts_thr_progress_is_managed_thread());
@@ -995,7 +997,7 @@ erts_thr_progress_unmanaged_delay__(void)
#ifdef ERTS_ENABLE_LOCK_CHECK
{
ErtsThrPrgrData *tpd = tmp_thr_prgr_data(NULL);
- tpd->is_delaying = 1;
+ tpd->is_delaying++;
}
#endif
return (ErtsThrPrgrDelayHandle) umrefc_ix;