aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib
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/stdlib
parent0a79b5b6612a0cb5997e77459bc756caf8bb0e99 (diff)
parenta56f6e3e716c4a2c8f16933e1e30759381c4fdb8 (diff)
downloadotp-398976f444a47ad019f8493bc6a23626589163f5.tar.gz
otp-398976f444a47ad019f8493bc6a23626589163f5.tar.bz2
otp-398976f444a47ad019f8493bc6a23626589163f5.zip
Merge branch 'maint'
Diffstat (limited to 'lib/stdlib')
-rw-r--r--lib/stdlib/doc/src/sys.xml3
-rw-r--r--lib/stdlib/src/sys.erl8
2 files changed, 9 insertions, 2 deletions
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) ->