Age | Commit message (Collapse) | Author |
|
The net (nif) module now actually loads (automatically)
when the VM is started (*on linux*).
Now we must make sure it *actually* works, and implement
the rest of the stuff...
|
|
OTP-14831
|
|
Added (some) use of the debug printouts in (nif-) open
and bind. Also fixed handling of the address argument
in the bind function(s) (since it was changed to be
of the in_sockaddr()).
OTP-14831
|
|
The map returned by the info function is now populated
with the "global stuff". That is, debug, iow and the
(global) counters (which are still not actually incremented).
Also added debug functions and macros (not yet used).
OTP-14831
|
|
Also added (a very) temporary example.
OTP-14831
|
|
The doc now builds. Had to update the code (spec and types)
to match. Though, te result is less then stellar.
OTP-14831
|
|
Its now possible to specify some "base" type(s) when
retreiving an "native" option (base type instead of
value size).
|
|
There are still many options not implemented (just as
for setopt), but this will have to do for now...
|
|
Rewrote the setopt handling. Still not complete, but now
the structure is "complete". That is, there is atleast one
option handled for each level.
|
|
|
|
|
|
|
|
|
|
|
|
Add setopt for one udp option: cork. This is not
platform independent. Aas fas as I know, it only works
on linux, so for now this serves as a placeholder.
|
|
Add handling of nodelay tcp option setopt.
Added placeholder sctp options autoclose and nodelay
(since my machine does not actually have sctp installed...).
|
|
|
|
Add functions for mapping network interface names and indexes.
Also refined the types for socket addresses: in4_sockaddr and
in6_sockaddr.
|
|
"Handle" the linger option "fully". We still have a lot
of options to handle. We also need to analyze the nif-code
for setopt...
|
|
*Very* partial setopt implementation.
|
|
|
|
There are still some questions regarding what hapopens
when writing / reading from an (remote) closed socket
(I talking about "properly" closed sockets).
|
|
There is probably a lot of things left to be
here. For instance the handling of ECONNRESET
when reading (recv and recvfrom).
Also some stuff about setopt and getopt.
|
|
Also updated the socket type (now a record for easy use).
|
|
Need to fix the use of the request ref (ID) handling
in previous functions.
|
|
Still not handling queue'ing of multiple send requests.
|
|
We still need to handle simultaneous ops. That is, handle
if two different procs tries to send at the same time. Or
a recv and send at the same time. Ops queue?
|
|
|
|
|
|
Still not implemented the 'cancel' operation.
This will be used when, for instance, we need to
cancel an ongoing connect that has taken to long
time to complete (the select).
The idea is to use select(STOP).
|
|
|
|
|
|
|
|
This fixes a crash that would occur when using file:read_file_info/1
on a file with a non-link reparse point, which are commonly seen in
RSS and OneDrive folders.
|
|
It wasn't possible to change group/owner separately, and our test
suite lacked coverage for that.
ERL-589
|
|
To the best of our knowledge this was introduced since file operations
on device files/FIFO:s could hang the emulator forever back when the
emulator was single-threaded and lacked IO threads; a read operation
could block all progress preventing the write operation it waited for
from occurring.
Granted, this could still happen through starving all dirty IO
schedulers, but the same issue can arise with NFS files which we've
always allowed.
Removing this restriction also lets us remove a stat(2) call that was
added to specifically allow `/dev/null`.
|
|
Most functions return this if they're given an invalid path, eg. if
they contain "<" or ">". ENOENT may seem like a strange translation,
but that's what open(2) returns when fed garbage, so we'll roll with
that.
|
|
This improves the latency of file operations as dirty schedulers
are a bit more eager to run jobs than async threads, and use a
single global queue rather than per-thread queues, eliminating the
risk of a job stalling behind a long-running job on the same thread
while other async threads sit idle.
There's no such thing as a free lunch though; the lowered latency
comes at the cost of increased busy-waiting which may have an
adverse effect on some applications. This behavior can be tweaked
with the +sbwt flag, but unfortunately it affects all types of
schedulers and not just dirty ones. We plan to add type-specific
flags at a later stage.
sendfile has been moved to inet_drv to lessen the effect of a nasty
race; the cooperation between inet_drv and efile has never been
airtight and the socket dying at the wrong time (Regardless of
reason) could result in fd aliasing. Moving it to the inet driver
makes it impossible to trigger this by closing the socket in the
middle of a sendfile operation, while still allowing it to be
aborted -- something that can't be done if it stays in the file
driver.
The race still occurs if the controlling process dies in the short
window between dispatching the sendfile operation and the dup(2)
call in the driver, but it's much less likely to happen now.
A proper fix is in the works.
--
Notable functional differences:
* The use_threads option for file:sendfile/5 no longer has any
effect.
* The file-specific DTrace probes have been removed. The same
effect can be achieved with normal tracing together with the
nif__entry/nif__return probes to track scheduling.
--
OTP-14256
|
|
|
|
* john/erts/fix-gunzip-eos/OTP-14730/ERL-507:
Only apply EOS behaviors if there's pending data
|
|
1.2.11 started bailing when avail_out==0 regardless of whether
there's anything to flush or not, and there's no point in adapting
the old method since it was vulnerable to bugs in other zlib
versions which updated the deflate parameters even on failure.
The api_deflateParams test has been expanded accordingly, and two
white-box cases in zip_usage has been updated to make fewer
assumptions about the output; the validity of the compressed data
is what matters, not whether it's exactly the same as the test
vector.
|
|
|
|
|
|
When presented with multiple valid but concatenated streams, the
old driver returned an empty result once the end of the first
stream was reached, and kept doing so even if fed new data. The
new driver/NIF returned a data_error instead.
zlib:inflateInit/3 has been added to control this behavior, but is
not yet ready for public use.
|
|
Besides being noisy, they were already defined by a global Unix-
specific header, causing the Windows build to fail if one forgot to
define them.
|
|
OTP-14527
|
|
All operations will now yield appropriately, allowing them to be used
freely in concurrent applications. This commit also deprecates the
functions listed below, although they won't raise deprecation
warnings until OTP 21:
zlib:adler32
zlib:crc32
zlib:inflateChunk
zlib:getBufSize
zlib:setBufSize
The behavior of throwing an error when a dictionary is required for
decompression has also been deprecated.
|
|
|
|
The extra trace data has been moved to the opts map in order
for the tracer to be able to distinguish inbetween extra
trace data 'undefined' and no extra trace data. In the same
commit all opts associations have been changed so that if
the tracer should not use them, the key is left unassicated
instead of being sent to undefined. This should be give a
small performance gain and also makes the API easier to work
with.
|
|
Make it so that it is only possible to remove a tracer via
returning remove from an erl_tracer. This limition is put in
place in order to avoid a lot of lock checking and taking
in various places, especially in regards to trace events
happening on dirty schedulers.
|