|
81 | 81 | group_leader/0, |
82 | 82 | process_flag/2, |
83 | 83 | get_module_info/1, |
84 | | - get_module_info/2 |
| 84 | + get_module_info/2, |
| 85 | + processes/0, |
| 86 | + binary_to_term/1, |
| 87 | + term_to_binary/1 |
85 | 88 | ]). |
86 | 89 |
|
87 | 90 | -export_type([ |
@@ -874,3 +877,39 @@ get_module_info(_Module) -> |
874 | 877 | -spec get_module_info(Module :: atom(), InfoKey :: atom()) -> any(). |
875 | 878 | get_module_info(_Module, _InfoKey) -> |
876 | 879 | erlang:nif_error(undefined). |
| 880 | + |
| 881 | +%%----------------------------------------------------------------------------- |
| 882 | +%% @returns A list of pids of all processes |
| 883 | +%% @doc Return a list of all current processes. |
| 884 | +%% Compared to Erlang/OTP, this function also returns native processes (ports). |
| 885 | +%% @end |
| 886 | +%%----------------------------------------------------------------------------- |
| 887 | +-spec processes() -> [pid()]. |
| 888 | +processes() -> |
| 889 | + erlang:nif_error(undefined). |
| 890 | + |
| 891 | +%%----------------------------------------------------------------------------- |
| 892 | +%% @returns A term decoded from passed binary |
| 893 | +%% @param Binary binary to decode |
| 894 | +%% @doc Decode a term that was previously encodes with `term_to_binary/1' |
| 895 | +%% This function should be mostly compatible with its Erlang/OTP counterpart. |
| 896 | +%% Unlike modern Erlang/OTP, resources are currently serialized as empty |
| 897 | +%% binaries and cannot be unserialized. |
| 898 | +%% @end |
| 899 | +%%----------------------------------------------------------------------------- |
| 900 | +-spec binary_to_term(Binary :: binary()) -> any(). |
| 901 | +binary_to_term(_Binary) -> |
| 902 | + erlang:nif_error(undefined). |
| 903 | + |
| 904 | +%%----------------------------------------------------------------------------- |
| 905 | +%% @returns A binary encoding passed term. |
| 906 | +%% @param Term term to encode |
| 907 | +%% @doc Encode a term to a binary that can later be decoded with `binary_to_term/1'. |
| 908 | +%% This function should be mostly compatible with its Erlang/OTP counterpart. |
| 909 | +%% Unlike modern Erlang/OTP, resources are currently serialized as empty |
| 910 | +%% binaries. |
| 911 | +%% @end |
| 912 | +%%----------------------------------------------------------------------------- |
| 913 | +-spec term_to_binary(Term :: any()) -> binary(). |
| 914 | +term_to_binary(_Term) -> |
| 915 | + erlang:nif_error(undefined). |
0 commit comments