diff options
author | Rickard Green <[email protected]> | 2012-08-20 13:48:29 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2012-12-03 21:18:08 +0100 |
commit | 56cef897ca3ad2377e34a6ea5800a54a28cbeb6e (patch) | |
tree | 0cbb2eba5b3de84cc8d22577af454f4ac2f38885 /erts/emulator/beam/erl_ptab.c | |
parent | 7e789df8dd9c7d86e9cc354521a37aa598aa5ec8 (diff) | |
download | otp-56cef897ca3ad2377e34a6ea5800a54a28cbeb6e.tar.gz otp-56cef897ca3ad2377e34a6ea5800a54a28cbeb6e.tar.bz2 otp-56cef897ca3ad2377e34a6ea5800a54a28cbeb6e.zip |
Optimize management of port tasks
Diffstat (limited to 'erts/emulator/beam/erl_ptab.c')
-rw-r--r-- | erts/emulator/beam/erl_ptab.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/erts/emulator/beam/erl_ptab.c b/erts/emulator/beam/erl_ptab.c index 7ab756ae8d..8dcdf94c80 100644 --- a/erts/emulator/beam/erl_ptab.c +++ b/erts/emulator/beam/erl_ptab.c @@ -415,11 +415,6 @@ last_data_cmp(Uint64 ld1, Uint64 ld2) #define ERTS_PTAB_LastData2EtermData(LD) \ ((Eterm) ((LD) & ~(~((Uint64) 0) << ERTS_PTAB_ID_DATA_SIZE))) -static void noop(void *unused) -{ - -} - void erts_ptab_init_table(ErtsPTab *ptab, ErtsAlcType_t atype, @@ -484,10 +479,6 @@ erts_ptab_init_table(ErtsPTab *ptab, ptab->r.o.invalid_element = invalid_element; ptab->r.o.invalid_data = erts_ptab_id2data(ptab, invalid_element->id); ptab->r.o.release_element = release_element; - if (release_element) - ptab->r.o.release_element = release_element; - else - ptab->r.o.release_element = noop; erts_smp_interval_init(&ptab->list.data.interval); ptab->list.data.deleted.start = NULL; @@ -678,9 +669,10 @@ erts_ptab_delete_element(ErtsPTab *ptab, erts_ptab_rwunlock(ptab); } - erts_schedule_thr_prgr_later_op(ptab->r.o.release_element, - (void *) ptab_el, - &ptab_el->u.release); + if (ptab->r.o.release_element) + erts_schedule_thr_prgr_later_op(ptab->r.o.release_element, + (void *) ptab_el, + &ptab_el->u.release); } /* |