aboutsummaryrefslogtreecommitdiffstats
path: root/erts/doc/src/erlang.xml
AgeCommit message (Collapse)Author
2018-07-09erts: Fix spec and docs for process_info 'monitored_by'Sverker Eriksson
to include ports and NIF resources. Added new opaque type 'nif_resource'.
2018-07-02erts: Remove obsolete paragraph about ERL_NO_VFORKSverker Eriksson
from erlang:open_port/2 docs.
2018-06-28Merge PR-1844 from arcz/ets_count OTP-15163Sverker Eriksson
Use erlang:system_info(ets_count) and improve docs
2018-06-24Add missing bracket to erlang:spawn_opt/4 priority option docsChristopher Keele
2018-06-20Update system_info doc to include ets_countArtur Cygan
2018-06-18Update copyright yearHenrik Nord
2018-06-13Explain why the AM becomes group leaderXavier Noria
2018-06-11[logger] Update documentationSiri Hansen
2018-06-04Merge branch 'sverker/ets-count/OTP-14987'Sverker Eriksson
* sverker/ets-count/OTP-14987: erts,stdlib: Improve docs about obsolete ets_limit erts: Reduce test log noise from ets_SUITE erts: Increase scalability of ets name lookup erts: Rename one of delete_trap to select_delete_trap erts: Refactor usage of am_atom_put to ERTS_MAKE_AM erts: Add system_info(ets_count) erts: Fix narrow race between ets:new and ets:delete
2018-06-04erts,stdlib: Improve docs about obsolete ets_limitSverker Eriksson
2018-06-04erts: Add system_info(ets_count)Sverker Eriksson
2018-06-04Merge pull request #1806 from bitnitdit/erlang-xml-typosLukas Larsson
Fix typos in erlang.xml
2018-05-16New process suspend implementation based on async signalingRickard Green
2018-05-06Fix typos in erlang.xmlbitnitdit
2018-04-29Introduce is_map_key/2 guard BIFMichał Muskała
This complements the `map_get/2` guard BIF introduced in #1784. Rationale. `map_get/2` allows accessing map fields in guards, but it might be problematic in more complex guard expressions, for example: foo(X) when map_get(a, X) =:= 1 or is_list(X) -> ... The `is_list/1` part of the guard could never succeed since the `map_get/2` guard would fail the whole guard expression. In this situation, this could be solved by using `;` instead of `or` to separate the guards, but it is not possible in every case. To solve this situation, this PR proposes a `is_map_key/2` guard that allows to check if a map has key inside a guard before trying to access that key. When combined with `is_map/1` this allows to construct a purely boolean guard expression testing a value of a key in a map. Implementation. Given the use case motivating the introduction of this function, the PR contains compiler optimisations that produce optimial code for the following guard expression: foo(X) when is_map(X) and is_map_key(a, X) and map_get(a, X) =:= 1 -> ok; foo(_) -> error. Given all three tests share the failure label, the `is_map_key/2` and `is_map/2` tests are optimised away. As with `map_get/2` the `is_map_key/2` BIF is allowed in match specs.
2018-04-25Merge branch 'map-get-bif' of git://github.com/michalmuskala/otpBjörn Gustavsson
* 'map-get-bif' of git://github.com/michalmuskala/otp: Introduce map_get guard-safe function OTP-15037
2018-04-24Introduce map_get guard-safe functionMichał Muskała
Rationale Today all compound data types except for maps can be deconstructed in guards. For tuples we have `element/2` and for lists `hd/1` and `tl/1`. Maps are completely opaque to guards. This means matching on maps can't be abstracted into macros, which is often done with repetitive guards. It also means that maps have to be always selected whole from ETS tables, even when only one field would be enough, which creates a potential efficiency issue. This PR introduces an `erlang:map_get/2` guard-safe function that allows extracting a map field in guard. An alternative to this function would be to introduce the syntax for extracting a value from a map that was planned in the original EEP: `Map#{Key}`. Even outside of guards, since this function is a guard-BIF it is more efficient than using `maps:get/2` (since it does not need to set up the stack), and more convenient from pattern matching on the map (compare: `#{key := Value} = Map, Value` to `map_get(key, Map)`). Performance considerations A common concern against adding this function is the notion that "guards have to be fast" and ideally execute in constant time. While there are some counterexamples (`length/1`), what is more important is the fact that adding those functions does not change in any way the time complexity of pattern matching - it's already possible to match on map fields today directly in patterns - adding this ability to guards will niether slow down or speed up the execution, it will only make certain programs more convenient to write. This first version is very naive and does not perform any optimizations.
2018-04-10erl_docgen: Add hover links for ghlinkLukas Larsson
All functions, datatype and h3 headings have gotten a hover attribute that shows a link directly to the edit page on github for easy editing of documentation. The github link links to the maint branch. An early attempt was done to use the SHA of the current branch, but that did not work well as github can only take pull requests from branches.
2018-04-09Fix erlang:abs/2 type docsLukas Larsson
2018-03-16mikpe/process_info-1-no-messages/PR-1745/OTP-14986Lukas Larsson
make erlang:process_info/1 not retrieve messages
2018-03-13Merge branch 'sverker/dist-flags-consolidate'Sverker Eriksson
2018-03-10update erlang:process_info/1 docsMikael Pettersson
2018-03-02erts: Improve send/2 docsSverker Eriksson
with link to ! operator and clarify ugly badarg for unregistered atom argument.
2018-03-02erts: Cleanup erlang:system_info docsLukas Larsson
Attempt to make the system_info docs easier to navigate by grouping items of similar themes together in the documentation.
2018-02-13Merge branch 'maint-20' into maintSverker Eriksson
* maint-20: Updated OTP version Update release notes Update version numbers erts: Add system_flags(erts_alloc,"+M?sbct *") erts: Add age order first fit allocator strategies erts: Refactor erl_ao_firstfit_alloc erts: Add migration options "acnl" and "acfml" kernel: Add os:cmd/2 with max_size option erts: Add more stats for mbcs_pool erts: Fix alloc_SUITE:migration stdlib: Make ets_SUITE memory check try again erts: Improve carrier pool search erts: Improve alloc_SUITE:migration erts: Refactor carrier dealloc migration
2018-02-12Merge 'sverker/maint-20/alloc-n-migration/ERIERL-88'Sverker Eriksson
into 'sverker/master/alloc-n-migration/ERIERL-88'
2018-02-12Merge 'sverker/maint-19/alloc-n-migration/ERIERL-88'Sverker Eriksson
into 'sverker/maint-20/alloc-n-migration/ERIERL-88' OTP-14915 OTP-14916 OTP-14917 OTP-14918
2018-02-12erts: Add system_flags(erts_alloc,"+M?sbct *")Sverker Eriksson
to change sbct limit in runtime for chosen allocator type. With great power comes great responsibility.
2018-01-17Merge branch 'maint'Lukas Larsson
2018-01-17Fix a broken erlang:trace/3 link in docKonstantinos Kallas
2018-01-09stdlib: Improve erl_eval's stacktracesHans Bolinder
The call "erlang:get_stacktrace()" is not handled explicitly. If there are issues, they can probably be ignored since erlang:get_stacktrace/1 will be deprecated and removed.
2017-11-30Add documentation for the new stacktrace syntaxBjörn Gustavsson
2017-11-23Merge branch 'sverker/async-auto-connect/OTP-14370' AGAINSverker Eriksson
2017-11-23erts: Fix erlang:monitor toward c-nodesSverker Eriksson
by suppressing DOP_MONITOR_P, DOP_MONITOR_P_EXIT and DOP_DEMONITOR_P if not supported by the remote node. In 17e198d6ee60f7dec9abfed272cf4226aea44535 I changed the behavior of erlang:monitor to not raise badarg for c-nodes but instead create a monitor to only supervise the connection. But I forgot to prevent DOP_MONITOR_P and friends from being sent to the node that does not expect them. Note: We test both DFLAG_DIST_MONITOR and DFLAG_DIST_MONITOR_NAME for the node to support process monitoring. This is because erl_interface is buggy as it sets DFLAG_DIST_MONITOR without really supporting it. ToDo: Should erl_interface stop setting DFLAG_DIST_MONITOR or should we change the meaning of these flags?
2017-11-20Merge branch 'maint'Lukas Larsson
2017-11-15Merge PR-1605 from sverker/sverker/binary_to_term-used OTP-14780Sverker Eriksson
Add 'used' option for binary_to_term/2
2017-10-31erts: Add term2bin note about encoding guaranteeLukas Larsson
2017-10-31system: Add info to profiling effeciency guideLukas Larsson
2017-10-31Update message queue and pinfo binary docsLukas Larsson
2017-10-27erts: Correct a link in erlang(3)Hans Bolinder
2017-10-27erts: Improve some links in erlang(3)Hans Bolinder
Use the "anchor" attribute to improve placement of anchors in conjunction with the "clause_i" attribute.
2017-10-17erts: Add 'used' option to binary_to_term/2Sverker Eriksson
2017-10-13Document the guarantees provided by get_stacktraceJosé Valim
2017-10-12Merge branch 'rickard/null-chars/ERL-370/OTP-14543'Rickard Green
* rickard/null-chars/ERL-370/OTP-14543: Don't allow null chars in various strings Conflicts: erts/emulator/beam/erl_alloc.types erts/preloaded/ebin/erlang.beam
2017-10-11Don't allow null chars in various stringsRickard Green
Various places that now reject null chars inside strings - Primitive file operations reject it in filenames. - Primitive environment variable operations reject it in names and values. - os:cmd() reject it in its input. Also '=' characters are rejected by primitive environment variable operations in environment variable names. Documentation has been updated to document null characters in these types of data as invalid. Currently these operations accept null chars at the end of strings, but that will change in the future.
2017-10-05Merge branch 'lukas/erts/poll-thread/OTP-14346'Lukas Larsson
* lukas/erts/poll-thread/OTP-14346: erts: Update +IOt and msacc docs
2017-10-02erts: Update +IOt and msacc docsLukas Larsson
2017-10-02Merge branch 'lukas/erts/poll-thread/OTP-14346'Lukas Larsson
* lukas/erts/poll-thread/OTP-14346: (25 commits) erts: Trigger ready events when erts_io_control fails erts: enif_select steal test kernel: Rewrite gen_udp_SUITE:read_packet tc erts: disable kernel-poll on OS X vsn < 16 erts: Fix msacc testcase with new poll-thread erts: Add testcases to test IOp and IOt options erts: get_internal_state(check_io_debug) now prints to error_logger erts: Remove eager check io erts: Move all I/O polling to a seperate thread erts: Fix smp_select testcase to use ERL_DRV_USE erts: Fix msacc unmanaged state counter erts: Optimize port_task quick allocator erts: Add ERTS_THR_PREF_QUICK_ALLOC_IMPL erts: Update suspend of scheduler to handle multiple pollsets erts: Add multiple poll sets erts: Some code cleanup for gdb to work better erts: temp_alloc can no longer be disabled erts: Refactor check_io to use one static struct erts: Replace check_io spinlock with lock-less list insertion erts: Add number of enif_select's to check_io_debug ...
2017-10-02erts: Remove eager check ioLukas Larsson
It is not longer relevant when using the poll thread
2017-09-15Merge branch 'maint'Björn Gustavsson
* maint: Document that the compiler may optimize away atoms