diff options
author | Siri Hansen <[email protected]> | 2014-05-07 11:17:24 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2014-05-26 11:53:25 +0200 |
commit | 6c3d24ccbc597e6d31db1f559470cc59585fdf52 (patch) | |
tree | 8509ed16e8f241b63dc0a5c9d202eb72d325bf4f /lib/stdlib/test/sys_sp1.erl | |
parent | aa0caafe360cce6afd91739a019ec1f8b3478424 (diff) | |
download | otp-6c3d24ccbc597e6d31db1f559470cc59585fdf52.tar.gz otp-6c3d24ccbc597e6d31db1f559470cc59585fdf52.tar.bz2 otp-6c3d24ccbc597e6d31db1f559470cc59585fdf52.zip |
Add system message 'terminate'
This is to be used when implementing synchronous stop of generic
behaviours and other 'sys special processes'.
Diffstat (limited to 'lib/stdlib/test/sys_sp1.erl')
-rw-r--r-- | lib/stdlib/test/sys_sp1.erl | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/lib/stdlib/test/sys_sp1.erl b/lib/stdlib/test/sys_sp1.erl index e84ffcfa12..0fb288991f 100644 --- a/lib/stdlib/test/sys_sp1.erl +++ b/lib/stdlib/test/sys_sp1.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 @@ -17,7 +17,7 @@ %% %CopyrightEnd% %% -module(sys_sp1). --export([start_link/1, stop/0]). +-export([start_link/1]). -export([alloc/0, free/1]). -export([init/1]). -export([system_continue/3, system_terminate/4, @@ -31,10 +31,6 @@ start_link(NumCh) -> proc_lib:start_link(?MODULE, init, [[self(),NumCh]]). -stop() -> - ?MODULE ! stop, - ok. - alloc() -> ?MODULE ! {self(), alloc}, receive @@ -70,11 +66,7 @@ loop(Chs, Parent, Deb) -> loop(Chs2, Parent, Deb2); {system, From, Request} -> sys:handle_system_msg(Request, From, Parent, - ?MODULE, Deb, Chs); - stop -> - sys:handle_debug(Deb, fun write_debug/3, - ?MODULE, {in, stop}), - ok + ?MODULE, Deb, Chs) end. system_continue(Parent, Deb, Chs) -> |