diff options
author | Raimo Niskanen <[email protected]> | 2019-02-25 12:10:40 +0100 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2019-02-25 12:10:40 +0100 |
commit | 17da9d0d5e08ef313055cf799fec7ee856fde1d4 (patch) | |
tree | e3d517e054103d98050d65b95ae8722c31abc22f /lib/stdlib/src/sys.erl | |
parent | f87e53dfd230bdac66cbbc756cb92c2f0957c465 (diff) | |
download | otp-17da9d0d5e08ef313055cf799fec7ee856fde1d4.tar.gz otp-17da9d0d5e08ef313055cf799fec7ee856fde1d4.tar.bz2 otp-17da9d0d5e08ef313055cf799fec7ee856fde1d4.zip |
Create a gen_statem type for enter_loop options
Diffstat (limited to 'lib/stdlib/src/sys.erl')
-rw-r--r-- | lib/stdlib/src/sys.erl | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/lib/stdlib/src/sys.erl b/lib/stdlib/src/sys.erl index 0064414d6f..e97f9bb342 100644 --- a/lib/stdlib/src/sys.erl +++ b/lib/stdlib/src/sys.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1996-2018. All Rights Reserved. +%% Copyright Ericsson AB 1996-2019. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -36,7 +36,7 @@ %% Types %%----------------------------------------------------------------- --export_type([dbg_opt/0]). +-export_type([dbg_opt/0, dbg_fun/0, debug_option/0]). -type name() :: pid() | atom() | {'global', term()} @@ -67,6 +67,16 @@ Event :: system_event(), Extra :: term()) -> any()). +-type debug_option() :: + 'trace' + | 'log' + | {'log', N :: pos_integer()} + | 'statistics' + | {'log_to_file', FileName :: file:name()} + | {'install', + {Func :: dbg_fun(), FuncState :: term()} + | {FuncId :: term(), Func :: dbg_fun(), FuncState :: term()}}. + %%----------------------------------------------------------------- %% System messages %%----------------------------------------------------------------- @@ -646,19 +656,7 @@ close_log_file(Debug) -> %% Returns: [debug_opts()] %%----------------------------------------------------------------- --spec debug_options(Options) -> [dbg_opt()] when - Options :: [Opt], - Opt :: 'trace' - | 'log' - | {'log', pos_integer()} - | 'statistics' - | {'log_to_file', FileName} - | {'install', FuncSpec}, - FileName :: file:name(), - FuncSpec :: {Func, FuncState} | {FuncId, Func, FuncState}, - FuncId :: term(), - Func :: dbg_fun(), - FuncState :: term(). +-spec debug_options([Opt :: debug_option()]) -> [dbg_opt()]. debug_options(Options) -> debug_options(Options, []). |