aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/beam/erl_time_sup.c2
-rw-r--r--erts/emulator/beam/time.c2
-rw-r--r--erts/emulator/sys/unix/sys_time.c11
-rw-r--r--erts/emulator/sys/win32/sys_time.c2
-rw-r--r--erts/preloaded/ebin/erlang.beambin106112 -> 106120 bytes
-rw-r--r--erts/preloaded/ebin/erts_internal.beambin12772 -> 12808 bytes
-rw-r--r--erts/preloaded/src/erlang.erl2
-rw-r--r--erts/preloaded/src/erts_internal.erl12
8 files changed, 11 insertions, 20 deletions
diff --git a/erts/emulator/beam/erl_time_sup.c b/erts/emulator/beam/erl_time_sup.c
index 8203436c85..bbdedcc128 100644
--- a/erts/emulator/beam/erl_time_sup.c
+++ b/erts/emulator/beam/erl_time_sup.c
@@ -1693,7 +1693,7 @@ static void
send_time_offset_changed_notifications(void *new_offsetp)
{
ErtsMonotonicTime new_offset;
- ErtsTimeOffsetMonitorInfo *to_mon_info;
+ ErtsTimeOffsetMonitorInfo *to_mon_info = NULL; /* Shut up faulty warning */
Uint no_monitors;
char *tmp = NULL;
diff --git a/erts/emulator/beam/time.c b/erts/emulator/beam/time.c
index 3dfd3f79d4..2bdda6c8af 100644
--- a/erts/emulator/beam/time.c
+++ b/erts/emulator/beam/time.c
@@ -576,7 +576,7 @@ erts_cancel_timer(ErlTimer *p)
{
ErtsTimerWheel *tiw;
ErlCancelProc cancel;
- void *arg;
+ void *arg = NULL; /* Shut up faulty warning... */
tiw = get_timer_wheel(p);
if (!tiw)
diff --git a/erts/emulator/sys/unix/sys_time.c b/erts/emulator/sys/unix/sys_time.c
index ea021a27cf..d535457977 100644
--- a/erts/emulator/sys/unix/sys_time.c
+++ b/erts/emulator/sys/unix/sys_time.c
@@ -410,11 +410,7 @@ erts_os_system_time(void)
stime = (ErtsSystemTime) posix_clock_gettime(WALL_CLOCK_ID,
WALL_CLOCK_ID_STR);
-#if defined(OS_MONOTONIC_TIME_USING_CLOCK_GETTIME)
- return stime;
-#else
return adj_stime_time_unit(stime, (Uint32) 1000*1000*1000);
-#endif
}
#endif /* defined(OS_SYSTEM_TIME_USING_CLOCK_GETTIME) */
@@ -516,8 +512,7 @@ ErtsMonotonicTime erts_os_monotonic_time(void)
#if defined(OS_SYSTEM_TIME_USING_CLOCK_GETTIME)
-static void erts_os_times(ErtsMonotonicTime *mtimep,
- ErtsSystemTime *stimep)
+void erts_os_times(ErtsMonotonicTime *mtimep, ErtsSystemTime *stimep)
{
posix_clock_gettime_times(mtimep, stimep);
}
@@ -627,11 +622,7 @@ erts_os_system_time(void)
ErtsSystemTime stime;
stime = (ErtsSystemTime) mach_clock_gettime(WALL_CLOCK_ID,
WALL_CLOCK_ID_STR);
-#if defined(OS_MONOTONIC_TIME_USING_MACH_CLOCK_GET_TIME)
- return stime;
-#else
return adj_stime_time_unit(stime, (Uint32) 1000*1000*1000);
-#endif
}
#endif /* defined(OS_SYSTEM_TIME_USING_MACH_CLOCK_GET_TIME) */
diff --git a/erts/emulator/sys/win32/sys_time.c b/erts/emulator/sys/win32/sys_time.c
index 7fe61084ce..b292d9279e 100644
--- a/erts/emulator/sys/win32/sys_time.c
+++ b/erts/emulator/sys/win32/sys_time.c
@@ -302,7 +302,7 @@ sys_init_time(ErtsSysInitTimeResult *init_resp)
internal_state.w.f.last_tick_count = 0;
init_resp->os_monotonic_time_info.func = "GetTickCount";
- init_resp->os_monotonic_time_info.locked_use = 1;
+ init_resp->os_monotonic_time_info.locked_use = 0;
/* 10-16 ms resolution according to MicroSoft documentation */
init_resp->os_monotonic_time_info.resolution = 100; /* 10 ms */
time_unit = (ErtsMonotonicTime) 1000;
diff --git a/erts/preloaded/ebin/erlang.beam b/erts/preloaded/ebin/erlang.beam
index 7e7ac99b1c..6baa3f9a13 100644
--- a/erts/preloaded/ebin/erlang.beam
+++ b/erts/preloaded/ebin/erlang.beam
Binary files differ
diff --git a/erts/preloaded/ebin/erts_internal.beam b/erts/preloaded/ebin/erts_internal.beam
index ad43962b8b..dca75fde95 100644
--- a/erts/preloaded/ebin/erts_internal.beam
+++ b/erts/preloaded/ebin/erts_internal.beam
Binary files differ
diff --git a/erts/preloaded/src/erlang.erl b/erts/preloaded/src/erlang.erl
index 4bbad4df99..fd11c101bc 100644
--- a/erts/preloaded/src/erlang.erl
+++ b/erts/preloaded/src/erlang.erl
@@ -1738,7 +1738,7 @@ start_timer(0, Dest, Msg) ->
orelse (erlang:is_atom(Dest)
andalso Dest /= undefined)),
TimerRef = erlang:make_ref(),
- try Dest ! {timeout, TimerRef, Msg} catch _:_ -> ok end,
+ _ = try Dest ! {timeout, TimerRef, Msg} catch _:_ -> ok end,
TimerRef
catch
_:_ ->
diff --git a/erts/preloaded/src/erts_internal.erl b/erts/preloaded/src/erts_internal.erl
index e2c3d40f61..e489001532 100644
--- a/erts/preloaded/src/erts_internal.erl
+++ b/erts/preloaded/src/erts_internal.erl
@@ -249,7 +249,7 @@ create_bif_timer() ->
-spec erts_internal:access_bif_timer(Ref) -> Res when
Ref :: reference(),
- Res :: {reference(), pid(), reference()}.
+ Res :: {reference(), pid()} | 'undefined'.
access_bif_timer(_Ref) ->
erlang:nif_error(undefined).
@@ -369,7 +369,7 @@ tsrv_handle_msg({cancel_timeout, BTR, From, Reply, Req, TRef},
false ->
ok;
_ ->
- try From ! {cancel_timer, Req, false} catch _:_ -> ok end
+ _ = try From ! {cancel_timer, Req, false} catch _:_ -> ok end
end,
Nxt;
[{Time, TRef} = TKey] ->
@@ -387,7 +387,7 @@ tsrv_handle_msg({cancel_timeout, BTR, From, Reply, Req, TRef},
false ->
((1000*(Time - RcvTime)) div Unit)
end,
- try From ! {cancel_timer, Req, RT} catch _:_ -> ok end
+ _ = try From ! {cancel_timer, Req, RT} catch _:_ -> ok end
end,
case Time =:= Nxt of
false ->
@@ -406,14 +406,14 @@ tsrv_handle_msg({read_timeout, BTR, From, Req, TRef},
Nxt) ->
case ets:lookup(RTab, TRef) of
[] ->
- try From ! {read_timer, Req, false} catch _:_ -> ok end;
+ _ = try From ! {read_timer, Req, false} catch _:_ -> ok end;
[{Time, TRef}] ->
RcvTime = erlang:monotonic_time(),
RT = case Time =< RcvTime of
true -> 0;
false -> (1000*(Time - RcvTime)) div Unit
end,
- try From ! {read_timer, Req, RT} catch _:_ -> ok end
+ _ = try From ! {read_timer, Req, RT} catch _:_ -> ok end
end,
Nxt;
tsrv_handle_msg({'DOWN', TRef, process, _, _},
@@ -473,6 +473,6 @@ tsrv_handle_timeout(CallTime, #tsrv_state{rtab = RTab,
end,
ets:delete(TTab, TKey),
ets:delete(RTab, TRef),
- try Proc ! Msg catch _:_ -> ok end,
+ _ = try Proc ! Msg catch _:_ -> ok end,
tsrv_handle_timeout(CallTime, S)
end.