From d281213a4a04a61910a6c451d8f5c86e61416bb2 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Mon, 11 Jul 2016 17:05:31 +0200 Subject: erts: Move all functions in docs to be in alphabetical order This commit only changes the order of functions and does some other rearrangements to that the diff with the next commit will be easier to follow. No content or XML tags are changed. --- erts/doc/src/erlang.xml | 476 ++++++++++++++++++++++++++---------------------- 1 file changed, 263 insertions(+), 213 deletions(-) (limited to 'erts/doc/src/erlang.xml') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 6289f033b2..cab18ac8b8 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -74,27 +74,33 @@ Supported time unit representations:

PartsPerSecond :: integer() >= 1 -

Time unit expressed in parts per second. That is, + +

Time unit expressed in parts per second. That is, the time unit equals 1/PartsPerSecond second.

seconds -

Symbolic representation of the time unit + +

Symbolic representation of the time unit represented by the integer 1.

milli_seconds -

Symbolic representation of the time unit + +

Symbolic representation of the time unit represented by the integer 1000.

micro_seconds -

Symbolic representation of the time unit + +

Symbolic representation of the time unit represented by the integer 1000000.

nano_seconds -

Symbolic representation of the time unit + +

Symbolic representation of the time unit represented by the integer 1000000000.

native -

Symbolic representation of the native time unit + +

Symbolic representation of the native time unit used by the Erlang runtime system.

The native time unit is determined at @@ -131,7 +137,8 @@ perf_counter -

Symbolic representation of the performance counter + +

Symbolic representation of the performance counter time unit used by the Erlang runtime system.

The perf_counter time unit behaves much in the same way @@ -470,17 +477,6 @@ - - - Converts a bitstring to a list. - -

Returns a list of integers corresponding to the bytes of - Bitstring. If the number of bits in the binary - is not divisible by 8, the last element of the list is a bitstring - containing the remaining 1-7 bits.

- - - Decodes an Erlang external term format binary. @@ -546,6 +542,17 @@ + + + Converts a bitstring to a list. + +

Returns a list of integers corresponding to the bytes of + Bitstring. If the number of bits in the binary + is not divisible by 8, the last element of the list is a bitstring + containing the remaining 1-7 bits.

+
+
+ Increments the reduction counter. @@ -582,6 +589,16 @@ + + + Cancels a timer. + +

Cancels a timer. The same as calling + erlang:cancel_timer(TimerRef, + []).

+
+
+ Cancels a timer. @@ -676,15 +693,6 @@ erlang:read_timer/2.

- - - Cancels a timer. - -

Cancels a timer. The same as calling - erlang:cancel_timer(TimerRef, - []).

-
-
Checks if a module has old code. @@ -935,14 +943,16 @@

The following options are available:

{packet_size, integer() >= 0} -

Sets the maximum allowed size of the packet body. + +

Sets the maximum allowed size of the packet body. If the packet header indicates that the length of the packet is longer than the maximum allowed length, the packet is considered invalid. Default is 0, which means no size limit.

{line_length, integer() >= 0} -

For packet type line, lines longer than + +

For packet type line, lines longer than the indicated length are truncated.

Option line_length also applies to http* packet types as an alias for option packet_size @@ -950,7 +960,8 @@ only intended for backward compatibility.

{line_delimiter, 0 =< byte() =< 255} -

For packet type line, sets the delimiting byte. + +

For packet type line, sets the delimiting byte. Default is the latin1 character $\n.

@@ -1239,7 +1250,8 @@ b

The following behavior applies if Reason is any term, except normal or kill:

- If Pid is not trapping exits, + + If Pid is not trapping exits, Pid itself exits with exit reason Reason. @@ -1963,6 +1975,19 @@ os_prompt%
+ + + Size of an iolist. + +

Returns an integer that is the size in bytes + of the binary that would be the result of + iolist_to_binary(Item), for example:

+
+> iolist_size([1,2|<<3,4>>]).
+4
+
+
+ Converts an iolist to a binary. @@ -1981,19 +2006,6 @@ os_prompt% - - - Size of an iolist. - -

Returns an integer that is the size in bytes - of the binary that would be the result of - iolist_to_binary(Item), for example:

-
-> iolist_size([1,2|<<3,4>>]).
-4
-
-
- Checks whether the local node is alive. @@ -3696,6 +3708,52 @@ os_prompt% + + + Performs a synchronous call to a port with term data. + +

Performs a synchronous call to a port. The meaning of + Operation and Data + depends on the port, that is, + on the port driver. Not all port drivers support this feature.

+

Port is a port identifier, + referring to a driver.

+

Operation is an integer, which is passed on to + the driver.

+

Data is any Erlang term. This data is converted + to binary term format and sent to the port.

+

Returns a term from the driver. The meaning of the returned + data also depends on the port driver.

+

Failures:

+ + badarg + + If Port is not an identifier of an open port, + or the registered name of an open port. If the calling + process was previously linked to the closed port, + identified by Port, the exit signal + from the port is guaranteed to be delivered before this + badarg exception occurs. + + badarg + + If Operation does not fit in a 32-bit integer. + + badarg + + If the port driver does not support synchronous control + operations. + + badarg + + If the port driver so decides for any reason (probably + something wrong with Operation + or Data). + + +
+
+ Closes an open port. @@ -3951,52 +4009,6 @@ os_prompt% - - - Performs a synchronous call to a port with term data. - -

Performs a synchronous call to a port. The meaning of - Operation and Data - depends on the port, that is, - on the port driver. Not all port drivers support this feature.

-

Port is a port identifier, - referring to a driver.

-

Operation is an integer, which is passed on to - the driver.

-

Data is any Erlang term. This data is converted - to binary term format and sent to the port.

-

Returns a term from the driver. The meaning of the returned - data also depends on the port driver.

-

Failures:

- - badarg - - If Port is not an identifier of an open port, - or the registered name of an open port. If the calling - process was previously linked to the closed port, - identified by Port, the exit signal - from the port is guaranteed to be delivered before this - badarg exception occurs. - - badarg - - If Operation does not fit in a 32-bit integer. - - badarg - - If the port driver does not support synchronous control - operations. - - badarg - - If the port driver so decides for any reason (probably - something wrong with Operation - or Data). - - -
-
- Information about a port. @@ -4454,14 +4466,16 @@ os_prompt% are stored. When the flag is:

off_heap -

+ +

All messages in the message queue will be stored outside of the process heap. This implies that no messages in the message queue will be part of a garbage collection of the process.

on_heap -

+ +

All messages in the message queue will eventually be placed on heap. They may however temporarily be stored off heap. This is how messages always have been stored @@ -5125,6 +5139,15 @@ os_prompt% + + + Reads the state of a timer. + +

Read the state of a timer. The same as calling + erlang:read_timer(TimerRef, + []).

+ +
Reads the state of a timer. @@ -5191,15 +5214,6 @@ os_prompt% erlang:cancel_timer/2.

- - - Reads the state of a timer. - -

Read the state of a timer. The same as calling - erlang:read_timer(TimerRef, - []).

-
-
@@ -5369,6 +5383,15 @@ true + + + Starts a timer. + +

Starts a timer. The same as calling + erlang:send_after(Time, + Dest, Msg, []).

+
+
Start a timer @@ -5382,15 +5405,6 @@ true erlang:start_timer/4.

- - - Starts a timer. - -

Starts a timer. The same as calling - erlang:send_after(Time, - Dest, Msg, []).

-
-
@@ -5891,6 +5905,16 @@ true + + + Starts a timer. + +

Starts a timer. The same as calling + erlang:start_timer(Time, + Dest, Msg, []).

+
+
+ Starts a timer. @@ -5961,16 +5985,6 @@ true - - - Starts a timer. - -

Starts a timer. The same as calling - erlang:start_timer(Time, - Dest, Msg, []).

-
-
- Information about active processes and ports. @@ -6367,6 +6381,20 @@ ok + + + Suspends a process. + +

Suspends the process identified by + Suspendee. The same as calling + erlang:suspend_process(Suspendee, + []).

+ +

This BIF is intended for debugging only.

+
+
+
+ Suspends a process. @@ -6468,20 +6496,6 @@ ok - - - Suspends a process. - -

Suspends the process identified by - Suspendee. The same as calling - erlang:suspend_process(Suspendee, - []).

- -

This BIF is intended for debugging only.

-
-
-
- Sets system flag backtrace_depth. @@ -6750,39 +6764,48 @@ ok bound and can be any of the following:

unbound -

Same as command-line argument + +

Same as command-line argument +sbt u in erl(1).

no_spread -

Same as command-line argument + +

Same as command-line argument +sbt ns in erl(1).

thread_spread -

Same as command-line argument + +

Same as command-line argument +sbt ts in erl(1).

processor_spread -

Same as command-line argument + +

Same as command-line argument +sbt ps in erl(1).

spread -

Same as command-line argument + +

Same as command-line argument +sbt s in erl(1).

no_node_thread_spread -

Same as command-line argument + +

Same as command-line argument +sbt nnts in erl(1).

no_node_processor_spread -

Same as command-line argument + +

Same as command-line argument +sbt nnps in erl(1).

thread_no_node_processor_spread -

Same as command-line argument + +

Same as command-line argument +sbt tnnps in erl(1).

default_bind -

Same as command-line argument + +

Same as command-line argument +sbt db in erl(1).

@@ -6877,16 +6900,19 @@ ok is used, the time offset state is left unchanged.

Returns the old state identifier. That is:

-

If preliminary is returned, finalization was + +

If preliminary is returned, finalization was performed and the time offset is now final.

-

If final is returned, the time offset was + +

If final is returned, the time offset was already in the final state. This either because another erlang:system_flag(time_offset, finalize) call, or because no time warp mode is used.

-

If volatile is returned, the time offset + +

If volatile is returned, the time offset cannot be finalized because multi time warp mode is used.

@@ -7468,7 +7494,8 @@ ok dtrace or systemtap).

end_time -

The last Erlang monotonic + +

The last Erlang monotonic time in native time unit that can be represented internally in the current Erlang runtime system @@ -7695,18 +7722,21 @@ ok introduced in the future:

{function, Function} -

Function is the name of the function + +

Function is the name of the function used. This tuple always exist if OS monotonic time is available to the runtime system.

{clock_id, ClockId} -

This tuple only exist if Function + +

This tuple only exist if Function can be used with different clocks. ClockId corresponds to the clock identifier used when calling Function.

{resolution, OsMonotonicTimeResolution} -

Highest possible + +

Highest possible resolution of current OS monotonic time source as parts per second. If no resolution information can be retrieved @@ -7724,7 +7754,8 @@ ok OsMonotonicTimeResolution.

{extended, Extended} -

Extended equals yes if + +

Extended equals yes if the range of time values has been extended; otherwise, Extended equals no. The range needs to be extended if Function @@ -7733,14 +7764,16 @@ ok value.

{parallel, Parallel} -

Parallel equals yes if + +

Parallel equals yes if Function is called in parallel from multiple threads. If it is not called in parallel, because calls needs to be serialized, Parallel equals no.

{time, OsMonotonicTime} -

OsMonotonicTime equals current OS + +

OsMonotonicTime equals current OS monotonic time in native time unit.

@@ -7757,17 +7790,20 @@ ok introduced in the future:

{function, Function} -

Function is the name of the funcion - used.

- + +

Function is the name of the funcion + used.

+
{clock_id, ClockId} -

This tuple only exist if Function + +

This tuple only exist if Function can be used with different clocks. ClockId corresponds to the clock identifier used when calling - Function.

- + Function.

+
{resolution, OsSystemTimeResolution} -

Highest possible + +

Highest possible resolution of current OS system time source as parts per second. If no resolution information can be retrieved @@ -7782,19 +7818,22 @@ ok precision do align with the resolution. You do, however, know that the precision is not better than - OsSystemTimeResolution.

- + OsSystemTimeResolution.

+ {parallel, Parallel} -

Parallel equals yes if + +

Parallel equals yes if Function is called in parallel from multiple threads. If it is not called in parallel, because calls needs to be serialized, Parallel equals - no.

- + no.

+ {time, OsSystemTime} -

OsSystemTime equals current OS + +

OsSystemTime equals current OS system time in native - time unit.

+ time unit.

+
port_parallelism @@ -7930,7 +7969,8 @@ ok with SMP support, otherwise false is returned.

start_time -

The Erlang monotonic + +

The Erlang monotonic time in native time unit at the time when current Erlang runtime system instance started. See also @@ -7973,14 +8013,16 @@ ok

Returns the state of the time offset:

preliminary -

The time offset is preliminary, and will be changed + +

The time offset is preliminary, and will be changed at a later time when being finalized. The preliminary time offset is used during the preliminary phase of the single time warp mode.

final -

The time offset is final. This either because + +

The time offset is final. This either because no time warp mode is used, or because the time offset have been finalized when @@ -7988,27 +8030,32 @@ ok time warp mode is used.

volatile -

The time offset is volatile. That is, it can + +

The time offset is volatile. That is, it can change at any time. This is because multi time warp mode is used.

time_warp_mode -

Returns a value identifying the + +

Returns a value identifying the time warp mode being used:

no_time_warp -

The no + +

The no time warp mode is used.

single_time_warp -

The single + +

The single time warp mode is used.

multi_time_warp -

The multi + +

The multi time warp mode is used.

@@ -9704,42 +9751,6 @@ timestamp() -> - - - Current date and time according to Universal Time Coordinated (UTC). - -

Returns the current date and time according to Universal - Time Coordinated (UTC) in the form - {{Year, Month, Day}, {Hour, Minute, Second}} if - supported by the underlying OS. - Otherwise erlang:universaltime() is equivalent to - erlang:localtime().

-

Example:

-
-> erlang:universaltime().
-{{1996,11,6},{14,18,43}}
-
-
- - - - Converts from Universal Time Coordinated (UTC) to local date and time. - -

Converts Universal Time Coordinated (UTC) date and time to - local date and time in the form - {{Year, Month, Day}, {Hour, Minute, Second}} if - supported by the underlying OS. - Otherwise no conversion is done, and - Universaltime is returned.

-

Example:

-
-> erlang:universaltime_to_localtime({{1996,11,6},{14,18,43}}).
-{{1996,11,7},{15,18,43}}
-

Failure: badarg if Universaltime denotes - an invalid date and time.

-
-
- Get a unique integer value @@ -9778,14 +9789,16 @@ timestamp() -> positive -

Return only positive integers.

+ +

Return only positive integers.

Note that by passing the positive modifier you will get heap allocated integers (bignums) quicker.

monotonic -

Return + +

Return strictly monotonically increasing integers corresponding to creation time. That is, the integer @@ -9834,6 +9847,43 @@ timestamp() -> + + + + Current date and time according to Universal Time Coordinated (UTC). + +

Returns the current date and time according to Universal + Time Coordinated (UTC) in the form + {{Year, Month, Day}, {Hour, Minute, Second}} if + supported by the underlying OS. + Otherwise erlang:universaltime() is equivalent to + erlang:localtime().

+

Example:

+
+> erlang:universaltime().
+{{1996,11,6},{14,18,43}}
+ +
+ + + + Converts from Universal Time Coordinated (UTC) to local date and time. + +

Converts Universal Time Coordinated (UTC) date and time to + local date and time in the form + {{Year, Month, Day}, {Hour, Minute, Second}} if + supported by the underlying OS. + Otherwise no conversion is done, and + Universaltime is returned.

+

Example:

+
+> erlang:universaltime_to_localtime({{1996,11,6},{14,18,43}}).
+{{1996,11,7},{15,18,43}}
+

Failure: badarg if Universaltime denotes + an invalid date and time.

+
+
+ Removes a link to another process or port. -- cgit v1.2.3