Age | Commit message (Collapse) | Author |
|
* lukas/ose/master/OTP-11334: (71 commits)
erts: Fix unix efile assert
ose: Use -O2 when building
ose: Expand OSE docs
ose: Add dummy ttsl driver
ose: Cleanup cleanup of mutex selection defines
ose: Polish mmap configure checks
ose: Add ose specific x-compile flags
ose: Updating fd_driver and spawn_driver for OSE
ose: Updating event and signal API for OSE
ose: Cleanup of mutex selection defines
win32: Compile erl_log.exe
ose: Remove uneccesary define
ose: Fix ssl configure test for osx
erts: Fix sys_msg_dispatcher assert
ose: Fix broken doc links
ose: Thread priorities configurable from lmconf
ose: Yielding the cpu is done "the OSE" way
ose: Start using ppdata for tse key
ose: Do not use spinlocks on OSE
ose: Fix support for crypto
...
Conflicts:
lib/crypto/c_src/crypto.c
|
|
If writev return an error (eg ENOSPC) we do not want to abort here
but instead propagate upwards into erlang.
|
|
|
|
|
|
The pattern used for getting the priority from the lmconf
is based on the name of the process created. The pattern is:
ERTS_%%PROCESS_NAME%%_PRIO
with the %%PROCESS_NAME%% replaced by the prefix of the process
the priority applies to. eg:
ERTS_SCHEDULER_PRIO=24
applies to processes with name SCHEDULER_1, SCHEDULER_2 etc.
|
|
This new API has less impact on the check_io code and
also removes the callback from ErlDrvEntry. The downside
is that you have to give the resolve function when creating
each event.
Also the mode if the resolve was removed as this mimics the
win32 code and decreases complexity.
|
|
Some OSE cross-chains have problems with system includes
being used, so for atleast OSE specific parts we use ""
instead of <>.
|
|
|
|
|
|
|
|
|
|
The interface of this module is made to be as generic as possible
in order for other IPC mechanisms to mimic it and allow porting of
code between different os:es.
|
|
This is needed because OSE does not use 1 for SEEK_CUR
|
|
This is needed because OSE does not have the same integers
as unix/win32 for SEEK_ST and friends.
|
|
This port has support for both non-smp and smp.
It contains a new way to do io checking in which erts_poll_wait
receives the payload of the polled entity. This has implications
for all linked-in drivers.
|
|
Daniel Goertzen reported that commit 8a147a7365 broke building
of Erlang/OTP on Gentoo Linux because the macro OF() was missing.
Apparently, on Gentoo the OF() macro in zconf.h has been renamed
to _Z_OF() (to avoid polluting the global namespace).
Don't use the OF() macro in gzio.c since it no longer serves any
useful purpose (it provided compatibility with pre-ANSI/ISO C
compilers, but the rest of Erlang/OTP requires an ANSI/ISO C
compiler anyway).
|
|
* lukas/erts/sendfile_no_async_pool/OTP-11639:
erts/kernel: sendfile no longer uses async threads
|
|
* lukas/erts/sendfile_passive_mode_fix/OTP-11614:
erts: fix bug when using passive mode and sendfile
|
|
The bug incorrectly issued driver_select when un-ignoring an fd
for a socket in passive mode, which caused an incorrect error
tuple to be returned when the remote end closed the connection.
|
|
This has been done because a slow client attack is possible if the
async thread pool is used. The scenario is:
Client does a request for a file and then slowly receives the file one
byte at a time. This will eventually fill the async thread pool with blocking
sendfile operations and thus starving the vm of all file operations.
If you still want to use the async threads pool for sendfile an option to
enable it has been introduced.
|
|
gzio.c is our own replacement for zlib's gzopen() etc
(based on a version of gzio.c that was included in an old version
of zlib).
Unfortunately, gzio.c still depends on the *internal* zlib header file
zutil.h which is not supposed to be used outside of the zlib source
code. The dependencies are the use of the gzFile typedef and the
F_OPEN() macro.
Instead of gzFile, define and use our own ErtsGzFile.
To get rid of the F_OPEN() macro, call open() of _wfopen() directly.
|
|
|
|
|
|
|
|
* sv/file-osync/OTP-11498:
Add sync option to file:open/2
Conflicts:
erts/preloaded/ebin/prim_file.beam
|
|
Conflicts:
erts/preloaded/ebin/prim_inet.beam
lib/kernel/test/gen_sctp_SUITE.erl
|
|
|
|
|
|
The sync option adds the POSIX O_SYNC flag to the open system call on
platforms that support the flag or its equivalent, e.g.,
FILE_FLAG_WRITE_THROUGH on Windows. For platforms that don't support it,
file:open/2 returns {error, enotsup} if the sync option is passed in.
The semantics of O_SYNC are platform-specific. For example, not all
platforms guarantee that all file metadata are written to the disk along
with the file data when the flag is in effect. This issue is noted in the
documentation this commit adds for the sync option.
Add a test for the sync option. Note however that the underlying OS
semantics for O_SYNC can't be tested automatically in any practical way, so
the test assumes the OS does the right thing with the flag when
present. For manual verification, dtruss on OS X and strace on Linux were
both run against beam processes to watch calls to open(), and file:open/2
was called in Erlang shells to open files for writing, both with and
without the sync option. Both the dtruss output and the strace output
showed that the O_SYNC flag was present in the open() calls when sync was
specified and was clear when sync was not specified.
|
|
|
|
|
|
Conflicts:
erts/preloaded/ebin/erlang.beam
|
|
* rickard-sverker/supercarrier/OTP-11149: (29 commits)
erts: Add test case for erts_mmap
erts: Add mutex to init_atoms in erts_mmap.c
erts: Fix lock violation for init_atoms in erl_mmap.c
erts: Fix misc minor bugs in supercarrier initialization
erts: Add erts_mmap stats
erts: Add erts_bld_tupleX macros
erts: Rename erts_bld_atom_uint_2tup_list to *_uword_*
erts: Fix bug in lookup_free_seg
erts: Fix race bug in erts_munmap
erts: Add HARD_DBG_MSEG
erts: Refactor rbt_insert in erl_mmap
erts: erts_mmap improved free seg desc management
erts: Add documentation for +MMsc* system flags
erts: Allow page aligned erts_munmap()
erts: Sort tree in super aligned sizes (SA_SZ_ADDR_ORDER)
erts: Fix ASSERT bug and void* arithmetics
erts: Add mmap argument to erts_debug:get_internal_state
erts: Improve erts_mmap out of free descriptor management
erts: Cleanup erl_mmap
erts: Add __func__ to ERTS_ASSERT macro
...
|
|
|
|
Introduce unconditional ERTS_ASSERT
and use that for both ASSERT and ASSERT_EXPR.
|
|
Add the {active,N} socket option, where N is an integer in the range
-32768..32767, to allow a caller to specify the number of data messages to
be delivered to the controlling process. Once the socket's delivered
message count either reaches 0 or is explicitly set to 0 with
inet:setopts/2 or by including {active,0} as an option when the socket is
created, the socket transitions to passive ({active, false}) mode and the
socket's controlling process receives a message to inform it of the
transition. TCP sockets receive {tcp_passive,Socket}, UDP sockets receive
{udp_passive,Socket} and SCTP sockets receive {sctp_passive,Socket}.
The socket's delivered message counter defaults to 0, but it can be set
using {active,N} via any gen_tcp, gen_udp, or gen_sctp function that takes
socket options as arguments, or via inet:setopts/2. New N values are added
to the socket's current counter value, and negative numbers can be used to
reduce the counter value. Specifying a number that would cause the socket's
counter value to go above 32767 causes an einval error. If a negative
number is specified such that the counter value would become negative, the
socket's counter value is set to 0 and the socket transitions to passive
mode. If the counter value is already 0 and inet:setopts(Socket,
[{active,0}]) is specified, the counter value remains at 0 but the
appropriate passive mode transition message is generated for the socket.
This commit contains a modified preloaded prim_inet.beam due to changes in
prim_inet.erl.
Add tests for {active,N} mode for TCP, UDP, and SCTP sockets.
Add documentation for {active,N} mode for inet, gen_tcp, gen_udp, and
gen_sctp.
|
|
files as delimiters.
While working on a tool that processes Erlang code and testing it against this repo,
I found out about those little sneaky 0xff. I thought it may be of help to other
people build such tools to remove non-conforming-to-standard characters.
|
|
* raimo/fix-signedness-flaws-in-efile_drv:
Fix EV_* macros and functions signedness flaws
|
|
* raimo/linux-network-namespace-sockopt/OTP-11157:
Document socket option 'netns'
Rudimentary test
Make netns option value a string
Implement netns for SCTP + bugfixes
Implement netns option for TCP and UDP
Implement emulator netns support for TCP and UDP
|
|
|
|
The actual port id is used to create a key from the
pointer value which is the ErlDrvPort. To do this
a new driver api function driver_async_port_key is
added and the driver API minor version is updated.
The documentation is updated and the faulty description of
how to spread ports over async threads is updated to
use the new API.
Testcase also added.
|
|
|
|
|
|
|
|
This is needed as some gcc versions seems to optimize this undefined
behaviour in a way which breaks this code.
|
|
|
|
|
|
|
|
Bug introduced in a73414d2e8ad03538 and never released.
|
|
* nox/fix-wcwidth/OTP-11106:
Properly guard WIDE_TAG use with HAVE_WCWIDTH in ttsl_drv
|