diff options
author | Rickard Green <[email protected]> | 2018-04-13 14:33:38 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2018-05-16 13:28:46 +0200 |
commit | 78f639da759cd3f8b5f28bc86ec404f3c3db60f4 (patch) | |
tree | 1e449df42cf4bd3e840a10de105a4646d19136e9 /erts/preloaded/src/erts_internal.erl | |
parent | 08873ec673ef223a4e0c9826b0370d80bb6aad24 (diff) | |
download | otp-78f639da759cd3f8b5f28bc86ec404f3c3db60f4.tar.gz otp-78f639da759cd3f8b5f28bc86ec404f3c3db60f4.tar.bz2 otp-78f639da759cd3f8b5f28bc86ec404f3c3db60f4.zip |
New process suspend implementation based on async signaling
Diffstat (limited to 'erts/preloaded/src/erts_internal.erl')
-rw-r--r-- | erts/preloaded/src/erts_internal.erl | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/erts/preloaded/src/erts_internal.erl b/erts/preloaded/src/erts_internal.erl index 79169b7d23..f0f83b7e9d 100644 --- a/erts/preloaded/src/erts_internal.erl +++ b/erts/preloaded/src/erts_internal.erl @@ -82,6 +82,12 @@ -export([gather_alloc_histograms/1, gather_carrier_info/1]). +-export([suspend_process/2]). + +-export([process_display/2]). + +-export([process_flag/3]). + %% %% Await result of send to port %% @@ -303,7 +309,8 @@ get_cpc_opts([{allow_gc, AllowGC} | Options], Async) when AllowGC == true; get_cpc_opts([], Async) -> Async. --spec check_dirty_process_code(Pid,Module) -> 'true' | 'false' when +-spec check_dirty_process_code(Pid, Module) -> Result when + Result :: boolean() | 'normal' | 'busy', Pid :: pid(), Module :: module(). check_dirty_process_code(_Pid,_Module) -> @@ -644,3 +651,29 @@ gather_alloc_histograms(_) -> gather_carrier_info(_) -> erlang:nif_error(undef). + +-spec suspend_process(Suspendee, OptList) -> Result when + Result :: boolean() | 'badarg' | reference(), + Suspendee :: pid(), + OptList :: [Opt], + Opt :: unless_suspending | asynchronous | {asynchronous, term()}. + +suspend_process(_Suspendee, _OptList) -> + erlang:nif_error(undefined). + +%% process_display/2 +-spec process_display(Pid, Type) -> 'true' | 'badarg' | reference() when + Pid :: pid(), + Type :: backtrace. +process_display(_Pid, _Type) -> + erlang:nif_error(undefined). + +%% process_flag/3 +-spec process_flag(Pid, Flag, Value) -> OldValue | 'badarg' | reference() when + Pid :: pid(), + Flag :: save_calls, + Value :: non_neg_integer(), + OldValue :: non_neg_integer(). +process_flag(_Pid, _Flag, _Value) -> + erlang:nif_error(undefined). + |