aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_ptab.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2012-08-15 01:28:55 +0200
committerRickard Green <[email protected]>2012-12-03 21:18:06 +0100
commit50cb7c24f061fd3d7df5970d8202f47c470a4047 (patch)
tree8d352994515c3217052cc5b64b78b597028ca75c /erts/emulator/beam/erl_ptab.c
parentb434a3ab242dde66e23a72122474854f51a61eff (diff)
downloadotp-50cb7c24f061fd3d7df5970d8202f47c470a4047.tar.gz
otp-50cb7c24f061fd3d7df5970d8202f47c470a4047.tar.bz2
otp-50cb7c24f061fd3d7df5970d8202f47c470a4047.zip
Use ptab functionality also for ports
Diffstat (limited to 'erts/emulator/beam/erl_ptab.c')
-rw-r--r--erts/emulator/beam/erl_ptab.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/erts/emulator/beam/erl_ptab.c b/erts/emulator/beam/erl_ptab.c
index 8195a350fb..8cab1de9da 100644
--- a/erts/emulator/beam/erl_ptab.c
+++ b/erts/emulator/beam/erl_ptab.c
@@ -660,11 +660,9 @@ erts_ptab_delete_element(ErtsPTab *ptab,
erts_ptab_rwunlock(ptab);
}
-#ifdef ERTS_SMP
erts_schedule_thr_prgr_later_op(ptab->r.o.release_element,
(void *) ptab_el,
&ptab_el->u.release);
-#endif
}
/*
@@ -1151,16 +1149,18 @@ ptab_list_bif_engine(Process *c_p, Eterm *res_accp, Binary *mbp)
conses = ptlbdp->pid_ix;
}
- hp = HAlloc(c_p, conses*2);
- ERTS_PTAB_LIST_DBG_SAVE_HEAP_ALLOC(ptlbdp, hp, conses*2);
+ if (conses) {
+ hp = HAlloc(c_p, conses*2);
+ ERTS_PTAB_LIST_DBG_SAVE_HEAP_ALLOC(ptlbdp, hp, conses*2);
- for (ix = ptlbdp->pid_ix - 1; ix >= min_ix; ix--) {
- ERTS_PTAB_LIST_ASSERT(erts_ptab_is_valid_id(ptlbdp->pid[ix]));
- res = CONS(hp, ptlbdp->pid[ix], res);
- hp += 2;
- }
+ for (ix = ptlbdp->pid_ix - 1; ix >= min_ix; ix--) {
+ ERTS_PTAB_LIST_ASSERT(erts_ptab_is_valid_id(ptlbdp->pid[ix]));
+ res = CONS(hp, ptlbdp->pid[ix], res);
+ hp += 2;
+ }
- ERTS_PTAB_LIST_DBG_VERIFY_HEAP_ALLOC_USED(ptlbdp, hp);
+ ERTS_PTAB_LIST_DBG_VERIFY_HEAP_ALLOC_USED(ptlbdp, hp);
+ }
ptlbdp->pid_ix = min_ix;
if (min_ix == 0)