aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2014-07-10 14:34:04 +0200
committerSiri Hansen <[email protected]>2014-07-10 14:34:04 +0200
commit398976f444a47ad019f8493bc6a23626589163f5 (patch)
tree7fbe10ab8c60823aa5b7c72fcc125dc20292c95c /lib
parent0a79b5b6612a0cb5997e77459bc756caf8bb0e99 (diff)
parenta56f6e3e716c4a2c8f16933e1e30759381c4fdb8 (diff)
downloadotp-398976f444a47ad019f8493bc6a23626589163f5.tar.gz
otp-398976f444a47ad019f8493bc6a23626589163f5.tar.bz2
otp-398976f444a47ad019f8493bc6a23626589163f5.zip
Merge branch 'maint'
Diffstat (limited to 'lib')
-rw-r--r--lib/sasl/doc/src/alarm_handler.xml12
-rw-r--r--lib/stdlib/doc/src/sys.xml3
-rw-r--r--lib/stdlib/src/sys.erl8
3 files changed, 17 insertions, 6 deletions
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 @@
<header>
<copyright>
<year>1996</year>
- <year>2013</year>
+ <year>2014</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
@@ -87,7 +87,9 @@
<v>AlarmId = term()</v>
</type>
<desc>
- <p>Clears all alarms with id <c>AlarmId</c>.
+ <p>Sends the <c>clear_alarm</c> event to all event handlers.</p>
+ <p>When receiving this event, the default simple handler
+ clears the latest received alarm with id <c>AlarmId</c>.
</p>
</desc>
</func>
@@ -109,8 +111,10 @@
<v>AlarmDescription = term()</v>
</type>
<desc>
- <p>Sets an alarm with id <c>AlarmId</c>. This id is used at a
- later stage when the alarm is cleared.
+ <p>Sends the <c>set_alarm</c> event to all event handlers.</p>
+ <p>When receiving this event, the default simple handler
+ stores the alarm. The <c>AlarmId</c> identifies the alarm
+ and is used when the alarm is cleared.
</p>
</desc>
</func>
diff --git a/lib/stdlib/doc/src/sys.xml b/lib/stdlib/doc/src/sys.xml
index 7fb82e0e7e..cf7df54d1d 100644
--- a/lib/stdlib/doc/src/sys.xml
+++ b/lib/stdlib/doc/src/sys.xml
@@ -115,6 +115,9 @@
<datatype>
<name name="dbg_fun"/>
</datatype>
+ <datatype>
+ <name name="format_fun"/>
+ </datatype>
</datatypes>
<funcs>
<func>
diff --git a/lib/stdlib/src/sys.erl b/lib/stdlib/src/sys.erl
index ec6813a28a..7e4bfa1fdd 100644
--- a/lib/stdlib/src/sys.erl
+++ b/lib/stdlib/src/sys.erl
@@ -47,7 +47,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(),
@@ -58,6 +58,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
%%-----------------------------------------------------------------
@@ -365,7 +369,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) ->