diff options
author | Kostis Sagonas <[email protected]> | 2010-11-06 18:03:51 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2010-11-09 14:55:47 +0100 |
commit | ef0fbe01537cd831f9b1fb09e0fd3ed84757183f (patch) | |
tree | cef3d2c919401d32eacabe226733b5e8b1ffe68e /erts/preloaded/src/init.erl | |
parent | 76378bb4a1a89d08b41d6f3df0edc6c26160bef7 (diff) | |
download | otp-ef0fbe01537cd831f9b1fb09e0fd3ed84757183f.tar.gz otp-ef0fbe01537cd831f9b1fb09e0fd3ed84757183f.tar.bz2 otp-ef0fbe01537cd831f9b1fb09e0fd3ed84757183f.zip |
init: Fix two erroneous specs
While at it, introduced a state() type and used it in some place.
Diffstat (limited to 'erts/preloaded/src/init.erl')
-rw-r--r-- | erts/preloaded/src/init.erl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/erts/preloaded/src/init.erl b/erts/preloaded/src/init.erl index 3ab9a1cd6d..24430a3d40 100644 --- a/erts/preloaded/src/init.erl +++ b/erts/preloaded/src/init.erl @@ -72,6 +72,7 @@ script_id = [], loaded = [], subscribed = []}). +-type state() :: #state{}. -define(ON_LOAD_HANDLER, init__boot__on_load_handler). @@ -146,10 +147,10 @@ restart() -> init ! {stop,restart}, ok. -spec reboot() -> 'ok'. reboot() -> init ! {stop,reboot}, ok. --spec stop() -> no_return(). +-spec stop() -> 'ok'. stop() -> init ! {stop,stop}, ok. --spec stop(non_neg_integer() | string()) -> no_return(). +-spec stop(non_neg_integer() | string()) -> 'ok'. stop(Status) -> init ! {stop,{stop,Status}}, ok. -spec boot([binary()]) -> no_return(). @@ -278,7 +279,7 @@ crash(String, List) -> halt(halt_string(String, List)). %% Status is {InternalStatus,ProvidedStatus} --spec boot_loop(pid(), #state{}) -> no_return(). +-spec boot_loop(pid(), state()) -> no_return(). boot_loop(BootPid, State) -> receive {BootPid,loaded,ModLoaded} -> |