aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/time.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2017-02-03 16:08:12 +0100
committerRickard Green <[email protected]>2017-04-18 12:40:02 +0200
commitd37df80764c9c2e517d7c9a90291d75975a5e9bb (patch)
tree79a6b73f5b6ced2d7d893ce19d3992aae95a805f /erts/emulator/beam/time.c
parent79ac974710ecab6dfe37b23b4fd3b52e760b3504 (diff)
downloadotp-d37df80764c9c2e517d7c9a90291d75975a5e9bb.tar.gz
otp-d37df80764c9c2e517d7c9a90291d75975a5e9bb.tar.bz2
otp-d37df80764c9c2e517d7c9a90291d75975a5e9bb.zip
Remove unnecessary cancel callback from timer-wheel timers
Diffstat (limited to 'erts/emulator/beam/time.c')
-rw-r--r--erts/emulator/beam/time.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/erts/emulator/beam/time.c b/erts/emulator/beam/time.c
index fdf74498c9..53896be19e 100644
--- a/erts/emulator/beam/time.c
+++ b/erts/emulator/beam/time.c
@@ -543,7 +543,6 @@ erts_create_timer_wheel(ErtsSchedulerData *esdp)
tiw->sentinel.next = &tiw->sentinel;
tiw->sentinel.prev = &tiw->sentinel;
tiw->sentinel.timeout = NULL;
- tiw->sentinel.cancel = NULL;
tiw->sentinel.arg = NULL;
return tiw;
}
@@ -577,14 +576,12 @@ erts_init_time(int time_correction, ErtsTimeWarpMode time_warp_mode)
void
erts_twheel_set_timer(ErtsTimerWheel *tiw,
ErtsTWheelTimer *p, ErlTimeoutProc timeout,
- ErlCancelProc cancel, void *arg,
- ErtsMonotonicTime timeout_pos)
+ void *arg, ErtsMonotonicTime timeout_pos)
{
ErtsMonotonicTime timeout_time;
ERTS_MSACC_PUSH_AND_SET_STATE_M_X(ERTS_MSACC_STATE_TIMERS);
p->timeout = timeout;
- p->cancel = cancel;
p->arg = arg;
ERTS_TW_ASSERT(p->slot == ERTS_TWHEEL_SLOT_INACTIVE);
@@ -632,14 +629,8 @@ void
erts_twheel_cancel_timer(ErtsTimerWheel *tiw, ErtsTWheelTimer *p)
{
if (p->slot != ERTS_TWHEEL_SLOT_INACTIVE) {
- ErlCancelProc cancel;
- void *arg;
ERTS_MSACC_PUSH_AND_SET_STATE_M_X(ERTS_MSACC_STATE_TIMERS);
remove_timer(tiw, p);
- cancel = p->cancel;
- arg = p->arg;
- if (cancel)
- (*cancel)(arg);
ERTS_MSACC_POP_STATE_M_X();
}
}