aboutsummaryrefslogtreecommitdiffstats
path: root/erts/doc
AgeCommit message (Collapse)Author
2010-06-15The R14A releaseOTP_R14AErlang/OTP
Final merge of all unexpected differences from dev to release.
2010-06-14OTP-8710 Fix emulator crash caused by setting CPU topologyRickard Green
A user defined CPU topology set via a call to <seealso marker="erlang#system_flag_cpu_topology">erlang:system_flag(cpu_topology, CPUTopology)</seealso> was not properly verified, and could in worst case cause an emulator crash. The emulator crash could only occur when a user defined CPU topology already existed and was redefined.
2010-06-11Update release notesBjörn Gustavsson
2010-06-09Merge branch 'pan/otp_8669_doc_autoimported' into devErlang/OTP
* pan/otp_8669_doc_autoimported: Change documentation for erlang:min/2,max/2 and port_command/3 to OTP-8669 erlang:min, erlang:max and erlang:port_command/3 autoimported The recently added BIFs erlang:min/2, erlang:max/2 and erlang:port_command/3 are now auto-imported (as they were originally intended to be). Due to the recent compiler change (OTP-8579), the only impact on old code defining it's own min/2, max/2 or port_command/3 functions will be a warning, the local functions will still be used. The warning can be removed by using -compile({no_auto_import,[min/2,max/2,port_command/3]}). in the source file.
2010-06-08Merge branch 'bg/nif_error' into devErlang/OTP
* commit 'bg/nif_error': crypto: Add type specs for all documented functions crypto: Use erlang:nif_error/1 to squelch false Dialyzer warnings Add erlang:nif_error/1,2
2010-06-04Change documentation for erlang:min/2,max/2 and port_command/3 toPatrik Nyblom
reflect auto-import
2010-06-03Add documentation for call time breakpointsBjörn-Egil Dahlberg
Documented call time breakpoints in - erlang:trace_pattern/3 - erlang:trace_info/2
2010-06-03OTP-8666 Enable automatic binding of schedulers when possibleRickard Green
The runtime system will by default bind schedulers to logical processors using the default_bind bind type if the amount of schedulers are at least equal to the amount of logical processors configured, binding of schedulers is supported, and a CPU topology is available at startup. NOTE: If the Erlang runtime system is the only operating system process that binds threads to logical processors, this improves the performance of the runtime system. However, if other operating system processes (as for example another Erlang runtime system) also bind threads to logical processors, there might be a performance penalty instead. If this is the case you, are are advised to unbind the schedulers using the <seealso marker="erl#+sbt">+sbtu</seealso> command line argument, or by invoking <seealso marker="erlang#system_flag_scheduler_bind_type">erlang:system_flag(schedule r_bind_type, unbound)</seealso>.
2010-06-03OTP-8555 Send message from NIFSverker Eriksson
New NIF features: Send messages from a NIF, or from thread created by NIF, to any local process (enif_send) Store terms between NIF calls (enif_alloc_env, enif_make_copy) Create binary terms with user defined memory management (enif_make_resource_binary)
2010-06-03Merge branch 'pan/otp_8086_ms_grammar' into devErlang/OTP
* pan/otp_8086_ms_grammar: Add match_specification grammar documentation specifically for ets OTP-8086 Grammar for match specification describes tracing only The grammar for match specifications in ERTS users guide only described the tracing dialect of match specifications. An informal grammar for the ETS dialect is added.
2010-06-02Merge branch 'jv/autoimport-binary_to_term_2' into devErlang/OTP
* jv/autoimport-binary_to_term_2: Change binary_to_term/2 to be auto-imported OTP-8671 jv/autoimport-binary_to_term_2 Now, binary_to_term/2 is auto-imported. This will cause a compile warning if and only if a module has got a local function with that name.
2010-06-02Add match_specification grammar documentation specifically for etsPatrik Nyblom
2010-05-31Add erlang:nif_error/1,2Björn Gustavsson
A stub function that is supposed to be replaced by a NIF usually calls erlang:error/1 to cause an exception if the NIF library is not loaded. For example: foo() -> erlang:error(nif_not_loaded). The problem is that although erlang:error/1 will normally never be called, Dialyzer will think that any call to the function will fail and thus generate false warnings. Adding a spec for the function will not help because Dialyzer will not believe the spec. Add erlang:nif_error/1,2 that work exactly like erlang:error/1,2. Define the return types for both BIFs to be t_any(). erlang:nif_error is used like this: -spec foo() -> binary(). foo() -> erlang:nif_error(nif_not_loaded). (The -spec is optional but highly recommended, since Dialyzer otherwise has no chance to figure out the types.)
2010-05-24erl_nif: add make_atom_len, make_existing_atom_len and make_string_lenTuncer Ayaz
Add new NIF API functions - enif_make_atom_len - enif_make_existing_atom_len - enif_make_string_len These are basically the same as enif_make_atom, enif_make_existing_atom and enif_make_string except that the new functions require a length parameter instead of a null-terminated C-string. Signed-off-by: Tuncer Ayaz <[email protected]>
2010-05-24erl_nif: add enif_get_atom_length and enif_get_list_lengthTuncer Ayaz
Add new NIF API functions - enif_get_atom_length - enif_get_list_length Signed-off-by: Tuncer Ayaz <[email protected]>
2010-05-24erl_nif: add enif_is_list and enif_is_tupleTuncer Ayaz
Add new NIF API functions - enif_is_list - enif_is_tuple Signed-off-by: Tuncer Ayaz <[email protected]>
2010-05-24Change binary_to_term/2 to be auto-importedJayson Vantuyl
While binary_to_term/2 was added in R13B04, it wasn't auto-imported. This conformed to longstanding policy of not changing auto-imports between major versions. This patch contains changes to auto-import binary_to_term/2 to coincide with the release of R14.
2010-05-21Correct typos in EEP-0031 implementationTuncer Ayaz
Signed-off-by: Tuncer Ayaz <[email protected]>
2010-05-17Add documentation for binary modulePatrik Nyblom
Correct behaviour of copy/2 witn 0 copies.
2010-05-17Fix typo in code exampleRaimo Niskanen
Reported by Uwe Dauernheim.
2010-04-28OTP-8474 NIF improvements after R13B04Sverker Eriksson
New NIF API function enif_make_new_binary
2010-04-09Merge branch 'ta/nif-documentation' into devErlang/OTP
* ta/nif-documentation: Fix typos in erl_nif.xml Build erl_nif manpage OTP-8558 ta/nif-documentation
2010-04-07Fix typos in erl_nif.xmlTuncer Ayaz
Fix a couple trivial typos in erl_nif.xml. Signed-off-by: Tuncer Ayaz <[email protected]>
2010-04-06Build erl_nif manpageTuncer Ayaz
Build and install erl_nif manpage. Signed-off-by: Tuncer Ayaz <[email protected]>
2010-03-26Fix spelling: "loose" is not a verbMagnus Henoch
"Lose" means not "not win", but "loose" means "not tight". Change "loose" to "lose" where appropriate.
2010-03-22Merge branch 'pan/otp_8332_halfword' into devErlang/OTP
* pan/otp_8332_halfword: Teach testcase in driver_suite the new prototype for driver_async wx: Correct usage of driver callbacks from wx thread Adopt the new (R13B04) Nif functionality to the halfword codebase Support monitoring and demonitoring from driver threads Fix further test-suite problems Correct the VM to work for more test suites Teach {wordsize,internal|external} to system_info/1 Make tracing and distribution work Turn on instruction packing in the loader and virtual machine Add the BeamInstr data type for loaded BEAM code Fix the BEAM dissambler for the half-word emulator Store pointers to heap data in 32-bit words Add a custom mmap wrapper to force heaps into the lower address range Fit all heap data into the 32-bit address range
2010-03-17Merge branch 'hawk/escript-add-create-and-extract' into devErlang/OTP
* hawk/escript-add-create-and-extract: Add type info for record fields Remove the undocumented function escript:foldl/3 Make reltool independent of the function escript:foldl/3 Add functions to create and extract escripts Add function zip:foldl/3 to iterate over zip archives OTP-8521 hawk/escript-add-create-and-extract Added function zip:foldl/3 to iterate over zip archives. Added functions to create and extract escripts. See escript:create/2 and escript:extract/2. The undocumented function escript:foldl/3 has been removed. The same functionality can be achieved with the more flexible functions escript:extract/2 and zip:foldl/3. Record fields has been annotated with type info. Source files as been adapted to fit within 80 chars and trailing whitespace hasd been removed.
2010-03-16Add functions to create and extract escriptsHåkan Mattsson
Both reltool and rebar needs to parse escripts. They are currently using an undocumented function called escript:foldl/3. It folds a function over all files in the body of an escript. If the body contains source code the function compiles it and the gives debug compiled beam code to the fold fun. If the body is an archive the fun is applied for all files in the archive. Instead of making the undocumented function public, the new functions escript:create/2 and escript:extract/2 has been introduced. Together with the new zip:foldl/3 function they have the same functionality as escript:foldl/3 in a more flexible and generic way. escript:foldl/3 should be removed as soon as reltool and rebar has been adopted to use the new functions. The simplest way for reltool and rebar to do this is to just copy the code from escript_SUITE:escript_foldl/3, which happens to provide a future compatible implementation of an emulated escript:foldl/3 function. I was quite hesitant when I introduced the compile_source option. It feels that it does not belong there but the alternative felt worse. The rationale for the compile_source option is that it is a bit cumbersome to compile the source code, as the source in most cases is partial. In order to do compile the source you need to know about some internals in escript. Without compile_source I think that these internals should be documented. Further you need to duplicate parts of the code. Without the compile_source option you need to first parse the source to forms, using an undocumented function in epp with an extended format of predefined macros which also is undocumented. Then you need to investigate the forms to see if you need to add an export form for main. When that is done you can run the rest of the compiler passes as usual. It is not so much code (60 lines or so) to write, but I do not want to urge people to write it. I actually wrote the code (see escript_SUITE:escript_foldl/3) before I decided to introduce the compile_source option.
2010-03-16Correct grammatical problems in conjunction with 'its'Matthias Lang
2010-03-16Change all incorrect occurrences of it's to itsMatthias Lang
The documentation (*.xml) in the otp tree has a common grammatical problem, "it's" and "its" are often interchanged. That is annoying for some readers. This commit consists entirely of "it's" -> "its" changes. I went through every .xml file in the tree. If there are any remaining bugs of this type, it's because I missed them, not because I didn't look.
2010-03-10Teach {wordsize,internal|external} to system_info/1Patrik Nyblom
Some test suites need to differentiate between 32-bit terms and 32-bit pointers. While at it, remove some more warnings in process.c for SMP and debug.
2010-02-19Update release notesBjörn-Egil Dahlberg
2010-02-17OTP-8335 NIF improvements:Sverker Eriksson
Driver API for multi-threading made available for NIFs. Support for mempory managed (garbage collected) resource objects. A way to pass "pointers" to native data structures between C and Erlang in a safe way. Support for references, floats and term comparison. Various new functions, like enif_inspect_iolist_as_binary, enif_make_sub_binary, enif_get_string, enif_get_atom, enif_make_tuple_from_array, enif_make_list_from_array, enif_make_existing_atom.
2010-02-17OTP-8335 NIF improvements:Sverker Eriksson
Driver API for multi-threading made available for NIFs. Support for mempory managed (garbage collected) resource objects. A way to pass "pointers" to native data structures between C and Erlang in a safe way. Support for references, floats and term comparison. Various new functions, like enif_inspect_iolist_as_binary, enif_make_sub_binary, enif_get_string, enif_get_atom, enif_make_tuple_from_array, enif_make_list_from_array, enif_make_existing_atom.
2010-02-17OTP-8457 Minor documentation fixes. Mainly anchor adjustments.Rickard Green
2010-02-15OTP-8335 NIF improvements:Sverker Eriksson
Driver API for multi-threading made available for NIFs. Support for mempory managed (garbage collected) resource objects. A way to pass "pointers" to native data structures between C and Erlang in a safe way. Various new functions, like enif_inspect_iolist_as_binary, enif_make_sub_binary, enif_get_string, enif_get_atom, enif_make_tuple_from_array, enif_make_list_from_array, enif_make_existing_atom.
2010-02-12Merge branch 'bd/doc-fixes' into ccase/r13b04_devErlang/OTP
* bd/doc-fixes: Fix minor documentation errors
2010-02-11OTP-8335 Even more NIF featuresSverker Eriksson
2010-02-10OTP-8422 Removed bogus "\011" character sequence in documentation.Hans Bolinder
2010-02-10Merge branch 'rani/inet_gethostbyname_fixes' into ccase/r13b04_devErlang/OTP
* rani/inet_gethostbyname_fixes: inet_res_SUITE: testcase fixes for legacy DNS resolver (Solaris 8) inet_res: /etc/resolv.conf: use domain as default search list inet: delayed/avoided read of /etc/resolv.conf and /etc/hosts inet_gethost_native: workaround for empty result hostname on MacOS X inet_res_SUITE: testcase fix for empty domain name inet:gethostbyname improved to parse IP strings and look up own hostname OTP-8426 The resolver routines failed to look up the own node name as hostname, if the OS native resolver was erroneously configured, bug reported by Yogish Baliga, now fixed. The resolver routines now tries to parse the hostname as an IP string as most OS resolvers do, unless the native resolver is used. The DNS resolver inet_res and file resolver inet_hosts now do not read OS configuration files until they are needed. Since the native resolver is default, in most cases they are never needed. The DNS resolver's automatic updating of OS configuration file data (/etc/resolv.conf) now uses the 'domain' keyword as default search domain if there is no 'search' keyword.
2010-02-10Fix minor documentation errorsBernard Duggan
Fix three minor typos and reorder one of a pair of lists of functions so that the ordering is consistent.
2010-02-09inet:gethostbyname improved to parse IP strings and look up own hostnameRaimo Niskanen
Now inet:gethostbyname tries to parse the hostname as an IP string first if the 'native' lookup method is not used. One can also make the IP string parsing explicit using the new 'string' lookup method, or avoid it using the new pseudo lookup method 'nostring'. In R13B04 a bug was introduced when the gethostbyname code was rewritten, so if the native resolver was used and misconfigured to not be able to look up the own hostname, inet:gethostbyname also failed. This is now fixed.
2010-02-02Add the +t emulator option to change the maximum number of atomsJulien Barbot
It is now possible to increase or decrease the maximum number of atoms the VM can handle. The default value is 1048576 (1024*1024).
2010-01-26OTP-8343 The documentation is now possible to build in an open sourceLars G Thorsen
environment after a number of bugs are fixed and some features are added in the documentation build process. - The arity calculation is updated. - The module prefix used in the function names for bif's are removed in the generated links so the links will look like http://www.erlang.org/doc/man/erlang.html#append_element-2 instead of http://www.erlang.org/doc/man/erlang.html#erlang:append_element-2 - Enhanced the menu positioning in the html documentation when a new page is loaded. - A number of corrections in the generation of man pages (thanks to Sergei Golovan) - Moved some man pages to more apropriate sections, pages in section 4 moved to 5 and pages in 6 moved to 7. - The legal notice is taken from the xml book file so OTP's build process can be used for non OTP applications.
2010-01-20Merge branch 'cf/compile_warning_as_error' into ccase/r13b04_devErlang/OTP
* cf/compile_warning_as_error: Add option -Werror in erlc(1) compile: add flag warnings_as_errors to treat warnings as errors compile.erl: remove trailing whitespace OTP-8382 The -Werror option for erlc and the compiler option warnings_as_errors will cause warnings to be treated as errors. (Thanks to Christopher Faulet.)
2010-01-19Add option -Werror in erlc(1)Christopher Faulet
Like in gcc, this option treats warnings as errors.
2010-01-15Merge branch 'egil/binary-gc' into ccase/r13b04_devErlang/OTP
* egil/binary-gc: Add documentation for binary heap size settings. Add tracing capabilities for binary virtual heap Add min heap size start options to beam and erl Improve binary garbage collection OTP-8370 The default settings for garbage collection of binaries has been adjusted to be less aggressive than in R13B03. It is now also possible configure the settings for binary GC. See the documentation for spawn_opt/2-5, erlang:system_info/1, erlang:system_flag/2, process_flag/2-3, erlang:trace/3, and the documenation for erl for the new command line options +hms and +hmbs.
2010-01-13Add documentation for binary heap size settings.Björn-Egil Dahlberg
Documentation of min_heap_size and min_bin_vheap size for: * spawn_opt/2, spawn_opt/3, spawn_opt/4, spawn_opt/5 * erlang:system_flag/2 * erlang:system_info/1 * process_flag/2 * process_info/2 * erlang:trace/3 Documentation for the new beam start arguments: +hms Size, Default minimum heap size for processes. +hmbs Size, Default minimum binary virtual heap size.
2010-01-12Merge branch 'jv/binary_to_term-opts' into ccase/r13b04_devErlang/OTP
* jv/binary_to_term-opts: document ErtsExternalDist flags and CON_ID mask add options to binary_to_term OTP-8367 There is new erlang:binary_to_binary/2 BIF that takes an option list. The option safe can be used to prevent creation of resources that are not garbage collected (such as atoms). (Thanks to Jayson Vantuyl.)
2010-01-08add options to binary_to_termJayson Vantuyl
term_to_binary and binary_to_term are powerful tools that can be used easily in lieu of a custom binary network protocol. Unfortunately, carefully crafted data can be used to exhaust the memory in an Erlang node by merely attempting to decode binaries. This makes it unsafe to receive data from untrusted sources. This is possible because binary_to_term/1 will allocate new atoms and new external function references. These data structures are not garbage collected. This patch implements the new form of binary_to_term that takes a list of options, and a simple option called 'safe'. If specified, this option will cause decoding to fail with a badarg error if an atom or external function reference would be allocated. In the general case, it will happily decode any Erlang term other than those containing new atoms or new external function references. However, fun, pid, and ref data types can embed atoms. They might fail to decode if one of these embedded atoms is new to the node. This may be an issue if encoded binaries are transferred between nodes or persisted between invocations of Erlang.