aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_thr_progress.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2016-08-25 15:34:43 +0200
committerRickard Green <[email protected]>2016-08-29 16:26:25 +0200
commitc429c3d042ba274d4225a6d79b2f1df8cfd19983 (patch)
treee0a4ecdbe38eaf3ed26cb589ab67bb7965c6ffc7 /erts/emulator/beam/erl_thr_progress.c
parent0e04e76df2ea71e2e2e116afef04c497d84b1024 (diff)
downloadotp-c429c3d042ba274d4225a6d79b2f1df8cfd19983.tar.gz
otp-c429c3d042ba274d4225a6d79b2f1df8cfd19983.tar.bz2
otp-c429c3d042ba274d4225a6d79b2f1df8cfd19983.zip
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;