Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
* sverker/remove-nif-reload:
erts: Cuddle nif_SUITE:consume_timeslice
erts: Remove old doc note for erlang:load_nif
erts: Remove deprecated nif 'reload' feature
erts: Fix trace_nif_SUITE to load nif lib only once
|
|
Anywhere but the beam sources we shouldn't #include "erl_nif.h", because
what "erl_nif.h" does is: (1) fail to find it outside of -I dirs, (2)
then treat it as if it was written like <erl_nif.h>. Using <erl_nif.h>
skips (1).
More information can be found in 6.10.2 of the C standard.
Because the examples use "erl_nif.h", NIF projects in the Erlang
ecosystem copy this verbatim and make the same mistake.
|
|
and instead let erlang:load_nif/2 return {error, {reload, _}}
before even trying to load the library
if a NIF library has already been successfully loaded
for the calling module instance.
|
|
Fix some older errors as well.
|
|
* rickard/ds-purge-module/OTP-13808:
Perform check_process_code while process is executing dirty
Conflicts:
erts/doc/src/erl_nif.xml
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
* rickard/ds-doc/OTP-13123:
minor fixes
|
|
|
|
|
|
* egil/erts/nif-format_term/OTP-13580:
runtime_tools: Change erts_snprintf to enif_snprintf
erts: Document enif_snprintf
erts: Add tests for enif_snprintf
erts: Add enif_snprintf
Conflicts:
erts/emulator/beam/erl_nif_api_funcs.h
|
|
|
|
- Termination of a process...
- Modify trace flags of process...
- Process info on process...
- Register/unregister of name on process...
- Set group leader on process...
... while it is executing a dirty NIF.
|
|
|
|
Add the possibility to use modules as trace data receivers. The functions
in the module have to be nifs as otherwise complex trace probes will be
very hard to handle (complex means trace probes for ports for example).
This commit changes the way that the ptab->tracer field works from always
being an immediate, to now be NIL if no tracer is present or else be
the tuple {TracerModule, TracerState} where TracerModule is an atom that
is later used to lookup the appropriate tracer callbacks to call and
TracerState is just passed to the tracer callback. The default process and
port tracers have been rewritten to use the new API.
This commit also changes the order which trace messages are delivered to the
potential tracer process. Any enif_send done in a tracer module may be delayed
indefinitely because of lock order issues. If a message is delayed any other
trace message send from that process is also delayed so that order is preserved
for each traced entity. This means that for some trace events (i.e. send/receive)
the events may come in an unintuitive order (receive before send) to the
trace receiver. Timestamps are taken when the trace message is generated so
trace messages from differented processes may arrive with the timestamp
out of order.
Both the erlang:trace and seq_trace:set_system_tracer accept the new tracer
module tracers and also the backwards compatible arguments.
OTP-10267
|
|
* lukas/erts/enif_send_null_env/OTP-13495:
erts: Add enif_send with NULL as msg env
|
|
* henrik/update-copyrightyear:
update copyright-year
|
|
This is an optimization for reducing the number of heap fragments
allocated when sending a message where the majority of the
message payload is on the sending process' heap.
|
|
|
|
* Accept a raw data buffer instead of ErlNifBinary
* Accept option ERL_NIF_BIN2TERM_SAFE
* Return number of read bytes
|
|
|
|
|
|
|
|
|
|
|
|
false if improper list
false if length > UINT_MAX
|
|
|
|
OTP-13147
* sverk/cpool_fetch-dc_list-fix:
erts: Reduce alloc_SUITE:rbtree runtime for valgrind
erts: Remove double free in efile_drv
erts: Improve alloc_SUITE:migration test
erts: Pass free mem and build type to alloc_SUITE tests
erts: Fix snprintf in alloc_SUITE for windows
erts: Workaround for strange crash on win64 in alloc_SUITE test code
erts: Refactor alloc_SUITE to use NIFs instead of drivers
erts: Add enif_getenv
erts: Make key argument constant for erl_drv_{get|put}env
erts: Add alloc_SUITE:migration
erts: Add TEST allocator
erts: Fix confusion of callbacks destroying_mbc() vs remove_mbc()
erts: Fix resurrection of carriers from dc_list
|
|
to read OS environment variables in a safe and portable way.
|
|
Fix mistakes found by 'xmllint'.
|
|
|
|
In the documentation for erl_nif, in the map iterator example,
the iterator argument was forgotten in the call to function
enif_map_iterator_create. This is now fixed.
|
|
* vinoski/enif-raise-exception/OTP-12770:
Add enif_raise_exception
Enhance enif_has_pending_exception
Fix for enif_schedule_nif and exceptions
Conflicts:
erts/doc/src/erl_nif.xml
|
|
by removing all full stop.
|
|
enif_make_reverse_list was at the wrong place
|
|
|
|
Add enif_raise_exception function to allow NIFs to raise error
exceptions holding any Erlang terms. This does not replace or
deprecate the enif_make_badarg function, though, because raising
badarg errors is so idiomatic in NIFs. Reimplement enif_make_badarg on
top of enif_raise_exception. Add new tests for enif_raise_exception
for both normal and dirty NIFs. Add documentation for
enif_raise_exception.
|
|
Sverker Eriksson came up with the following idea: to handle a future
ability for NIFs to raise more than just badarg exceptions, modify the
recently-added enif_has_pending_exception function to take a second
argument: a pointer to ERL_NIF_TERM. If this argument is a null
pointer, ignore it. Otherwise, if the first argument, an ErlNifEnv*,
has an associated exception, set the pointed-to ERL_NIF_TERM of the
second argument to the value of the exception term. Add new tests and
documentation for this modification.
|
|
|
|
|