aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded/src
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2016-02-25 15:27:29 +0100
committerBjörn-Egil Dahlberg <[email protected]>2016-02-25 15:27:29 +0100
commit93d2038e91854d4bc4fd75dac7005719a79949cd (patch)
tree6e56bd00815e289a2792bbc2d21ca02ea4791ee7 /erts/preloaded/src
parent87ed3fe4d7ddbc3c64d182032e9fe054600cf5ba (diff)
parent0ca09ee90d6384e74d1b18ab0e05f2c05fc03905 (diff)
downloadotp-93d2038e91854d4bc4fd75dac7005719a79949cd.tar.gz
otp-93d2038e91854d4bc4fd75dac7005719a79949cd.tar.bz2
otp-93d2038e91854d4bc4fd75dac7005719a79949cd.zip
Merge branch 'egil/heart-callback/OTP-13250' into maint
Diffstat (limited to 'erts/preloaded/src')
-rw-r--r--erts/preloaded/src/erts_internal.erl20
1 files changed, 20 insertions, 0 deletions
diff --git a/erts/preloaded/src/erts_internal.erl b/erts/preloaded/src/erts_internal.erl
index 7ed4efea4b..6db77a8482 100644
--- a/erts/preloaded/src/erts_internal.erl
+++ b/erts/preloaded/src/erts_internal.erl
@@ -35,6 +35,9 @@
-export([port_command/3, port_connect/2, port_close/1,
port_control/3, port_call/3, port_info/1, port_info/2]).
+-export([system_check/1,
+ gather_system_check_result/1]).
+
-export([request_system_task/3]).
-export([check_process_code/2]).
@@ -197,6 +200,23 @@ request_system_task(_Pid, _Prio, _Request) ->
check_process_code(_Module, _OptionList) ->
erlang:nif_error(undefined).
+-spec system_check(Type) -> 'ok' when
+ Type :: 'schedulers'.
+
+system_check(_Type) ->
+ erlang:nif_error(undefined).
+
+gather_system_check_result(Ref) when is_reference(Ref) ->
+ gather_system_check_result(Ref, erlang:system_info(schedulers)).
+
+gather_system_check_result(_Ref, 0) ->
+ ok;
+gather_system_check_result(Ref, N) ->
+ receive
+ Ref ->
+ gather_system_check_result(Ref, N - 1)
+ end.
+
%% term compare where integer() < float() = true
-spec cmp_term(A,B) -> Result when