From bbf3e70e806b796611d14d4660372072dce8bffb Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Thu, 3 Jul 2014 09:48:37 +0200 Subject: Fix spec of format function in sys The argument FormFunc is sys:handle_debug/4war erronously specified as dbg_fun(), which is a debug function. This has now been corrected by adding a new type, format_fun(). --- lib/stdlib/doc/src/sys.xml | 5 ++++- lib/stdlib/src/sys.erl | 10 +++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/stdlib/doc/src/sys.xml b/lib/stdlib/doc/src/sys.xml index a46fa1289f..19605f325b 100644 --- a/lib/stdlib/doc/src/sys.xml +++ b/lib/stdlib/doc/src/sys.xml @@ -4,7 +4,7 @@
- 19962013 + 19962014 Ericsson AB. All Rights Reserved. @@ -115,6 +115,9 @@ + + + diff --git a/lib/stdlib/src/sys.erl b/lib/stdlib/src/sys.erl index e25cc25f57..d3ba09ce82 100644 --- a/lib/stdlib/src/sys.erl +++ b/lib/stdlib/src/sys.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2013. All Rights Reserved. +%% Copyright Ericsson AB 1996-2014. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -46,7 +46,7 @@ {N :: non_neg_integer(), [{Event :: system_event(), FuncState :: _, - FormFunc :: dbg_fun()}]}} + FormFunc :: format_fun()}]}} | {'statistics', {file:date_time(), {'reductions', non_neg_integer()}, MessagesIn :: non_neg_integer(), @@ -57,6 +57,10 @@ Event :: system_event(), ProcState :: _) -> 'done' | (NewFuncState :: _)). +-type format_fun() :: fun((Device :: io:device() | file:io_device(), + Event :: system_event(), + Extra :: term()) -> any()). + %%----------------------------------------------------------------- %% System messages %%----------------------------------------------------------------- @@ -346,7 +350,7 @@ handle_system_msg(SysState, Msg, From, Parent, Mod, Debug, Misc, Hib) -> %%----------------------------------------------------------------- -spec handle_debug(Debug, FormFunc, Extra, Event) -> [dbg_opt()] when Debug :: [dbg_opt()], - FormFunc :: dbg_fun(), + FormFunc :: format_fun(), Extra :: term(), Event :: system_event(). handle_debug([{trace, true} | T], FormFunc, State, Event) -> -- cgit v1.2.3 From da15f706159db83100dde62b2e3069ae46e88c09 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Tue, 1 Jul 2014 15:25:33 +0200 Subject: Fix bug in alarm_handler documentation The documentation erroneously specified that clear_alarm/1 would clear *all* alarms with id AlarmId. This is now corrected according to the implementation - only the latest received alarm with the given AlarmId is cleared. --- lib/sasl/doc/src/alarm_handler.xml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/sasl/doc/src/alarm_handler.xml b/lib/sasl/doc/src/alarm_handler.xml index ab3041137e..e4def7c7f5 100644 --- a/lib/sasl/doc/src/alarm_handler.xml +++ b/lib/sasl/doc/src/alarm_handler.xml @@ -5,7 +5,7 @@
1996 - 2013 + 2014 Ericsson AB, All Rights Reserved @@ -87,7 +87,9 @@ AlarmId = term() -

Clears all alarms with id AlarmId. +

Sends the clear_alarm event to all event handlers.

+

When receiving this event, the default simple handler + clears the latest received alarm with id AlarmId.

@@ -109,8 +111,10 @@ AlarmDescription = term() -

Sets an alarm with id AlarmId. This id is used at a - later stage when the alarm is cleared. +

Sends the set_alarm event to all event handlers.

+

When receiving this event, the default simple handler + stores the alarm. The AlarmId identifies the alarm + and is used when the alarm is cleared.

-- cgit v1.2.3