Age | Commit message (Collapse) | Author | |
---|---|---|---|
2019-01-07 | erts: Add enif_select_read|write with 'msg_env' argument | Sverker Eriksson | |
2018-12-13 | Merge branch 'maint' | Sverker Eriksson | |
2018-12-12 | Add empty 'since' attribute for old modules and functions | Sverker Eriksson | |
2018-12-11 | Add "since" attributes in xml for new functions and modules | Sverker Eriksson | |
introduced after OTP_R13B03. | |||
2018-11-29 | Merge branch 'maint' | Sverker Eriksson | |
2018-11-29 | Replace mathematical jargon in erl_nif docs PR-2037 | Bartosz Błaszków | |
2018-11-22 | Merge branch 'maint' | Sverker Eriksson | |
2018-11-21 | erts: Clarify erl_nif docs about callback environments | Sverker Eriksson | |
2018-10-01 | Merge branch 'maint' | Lukas Larsson | |
2018-10-01 | Fix spelling of intended in erl_nif docs | Lukas Larsson | |
2018-07-20 | erts: Add ERL_NIF_SELECT_CANCEL flag for enif_select | Sverker Eriksson | |
to deselect read and/or writes without stop callback. | |||
2018-07-16 | erts: Clarify erl_nif docs of enif_*printf and %T | Sverker Eriksson | |
2018-07-09 | erts: Fix spec and docs for process_info 'monitored_by' | Sverker Eriksson | |
to include ports and NIF resources. Added new opaque type 'nif_resource'. | |||
2018-06-18 | Update copyright year | Henrik Nord | |
2018-04-06 | erts: Fix doc typo for enif_free_iovec | Sverker Eriksson | |
2018-03-23 | Add enif_make_map_from_arrays | John Högberg | |
2018-03-22 | Merge branch 'sverker/enif-name-funcs/OTP-14994' | Sverker Eriksson | |
2018-03-22 | erts: Remove const from ErlNifResourceDown doc | Sverker Eriksson | |
to conform with erl_nif.h | |||
2018-03-22 | erts: Add statement about errno to enif_*printf docs | Sverker Eriksson | |
2018-03-22 | erts: Add enif_vfprintf and enif_vsnprintf | Sverker Eriksson | |
2018-03-22 | erts: Add enif_*_name functions | Sverker Eriksson | |
2018-03-16 | Merge pull request #1746 from legoscia/erl_nif.xml-spelling | Lukas Larsson | |
Fix typos in erl_nif.xml | |||
2018-03-13 | Fix typos in erl_nif.xml | Magnus Henoch | |
2018-03-07 | erts: Add enif_fprintf docs | Sverker Eriksson | |
2018-02-26 | Merge branch 'maint' | Sverker Eriksson | |
2018-02-26 | Suggest using enif_make_new_binary when possible | John Högberg | |
While enif_make_binary will create heap-binaries from ErlNifBinaries when possible now, enif_alloc_binary still allocates a Binary* off-heap which is avoided entirely with enif_make_new_binary. | |||
2018-02-23 | erts: Clarify enif_self docs | Sverker Eriksson | |
2017-11-30 | Add enif_ioq_peek_head | John Högberg | |
This introduces a way to retrieve erlang terms from NIF IO queues without having to resort to copying. OTP-14797 | |||
2017-11-23 | Document alignment guarantees of enif_alloc and enif_realloc | Anthony Ramine | |
2017-11-21 | Document enif_realloc | Anthony Ramine | |
2017-09-07 | Merge branch 'sverker/nif-resource-doc' into maint | Sverker Eriksson | |
* sverker/nif-resource-doc: erts: Update docs for enif_make_resource | |||
2017-09-05 | erts: Update docs for enif_make_resource | Sverker Eriksson | |
to include new defined properties in OTP-20 regarding comparison and serialization. | |||
2017-09-05 | erts: Add nif ioq | Lukas Larsson | |
2017-05-22 | Add enif_whereis_...() functions | Ted Burghart | |
#### Why do we need this new feature? There are cases when a NIF needs to send a message, using `enif_send()`, to a long-lived process with a registered name. A common use-case is logging, where asynchronous fire-and-forget messages are the norm. There can also be cases where a yielding or dirty NIF or background thread may request a callback from a service with additional information it needs to complete its operation, yielding or waiting (with suitable timeouts, etc) until its state has been updated through the NIF module's API. NIFs can only send messages to pids, and the lack of name resolution leaves a complicated dance between separate monitoring processes and the NIF as the only way to keep a NIF informed of the whereabouts of such long-lived processes. Providing a reliable, built-in facility for NIFs to resolve process (or port) names simplifies these use cases considerably. #### Risks or uncertain artifacts? Testing has not exposed any significant risk. The implementation behaves as expected on regular and dirty scheduler threads as well as non-scheduler threads. By constraining the `enif_whereis_...()` functions to their minimal scopes and using patterns consistent with related functions, the implementation, testing, and maintenance burden is low. The API and behavior of existing functions is unchanged. #### How did you solve it? While extending `enif_send()` to operate on a pid or an atom (as `erlang:send/2` does) was attractive, it would have entailed changing the type of its `to_pid` parameter and thereby breaking backward compatibility. The same consideration applies to `enif_port_command()`. That leaves a choice between 1, 2, or 3 new functions: 1. `enif_whereis()` 2. `enif_whereis_pid()` and `enif_whereis_port()` 3. All of the above. While option (1), directly mimicking the behavior of `erlang:whereis/1`, is appealing, it poses potential problems if `pid()` or `port()` are subsequently implemented as non-integral types that must be bound to an owning `ErlNifEnv` instance. Therefore, option (2) has been chosen to use `ErlNifPid`/`ErlNifPort` structures in the API to maintain proper term ownership semantics. | |||
2017-05-10 | erts: Improve erl_nif docs | Sverker Eriksson | |
2017-05-04 | Update copyright year | Raimo Niskanen | |
2017-04-24 | erts: Discontinue salted use of enif_hash/phash2 | Guilherme Andrade | |
2017-04-22 | erts: Allow for easier future enif_hash expansion | Guilherme Andrade | |
Allow for expanding support to 64-bit hashes without breaking the interface. | |||
2017-04-22 | erts: Improve enif_hash documentation | Guilherme Andrade | |
2017-04-22 | erts: Support custom salt in enif_hash | Guilherme Andrade | |
2017-04-20 | erts: Refactor enif_phash2 into enif_hash | Guilherme Andrade | |
A more generic hashing function which can also hash terms based on `make_internal_hash'. | |||
2017-04-20 | erts: Remove enif_phash2_ranged | Guilherme Andrade | |
2017-04-19 | erts: Add enif_phash2 and enif_phash2_ranged | Guilherme Andrade | |
These allow one to hash VM terms from NIF code. | |||
2017-03-07 | erts: Fix xml lint warning for erl_nif | Sverker Eriksson | |
2017-02-22 | Add docs for enif_compare_monitors and ErlNifMonitor | Sverker Eriksson | |
2017-02-20 | Fix erl_nif doc | Sverker Eriksson | |
2017-02-20 | Merge branch 'master' into sverker/enif_select | Sverker Eriksson | |
Conflicts: erts/emulator/beam/erl_binary.h erts/emulator/beam/erl_monitors.c erts/emulator/beam/erl_nif.c erts/emulator/beam/global.h erts/emulator/test/nif_SUITE_data/nif_SUITE.c | |||
2017-02-09 | erts: Change return value for enif_select | Sverker Eriksson | |
to negative int as error and positive as success. | |||
2017-02-09 | erts: Add pid argument to enif_select | Sverker Eriksson | |
2017-02-09 | erts: Add enif_monitor_process and enif_demonitor_process | Sverker Eriksson | |