aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
AgeCommit message (Collapse)Author
2019-03-05[socket] Make use of official monitor to term functionMicael Karlberg
Remove own function to make monitor printable (was a hack) and make use of the new enif_make_monitor_term instead.
2019-03-04Merge branch 'bmk/20190304/openindiana_types' into ↵Micael Karlberg
bmk/20190301/cleanup_through_macro_abuse/OTP-15565
2019-03-04[socket] Fixed various type size and unused function warningsMicael Karlberg
Fixed some type size warnings (SCTP related). E.g: On Solaris 11 (OpenIndiana Hipster) long and int is size 4, but the way Sint32 def works it first "tests" for long size and if that is correct, that is chosen (which it is on Solaris 11). On linux long is size 8, so Sint32 will be defined as int. ... On Solaris 11 the flags TCP_CONGESTION and SO_BINDTODEVICE does not exist, so the function(s) n[set|get]opt_str_opt is never used. So, in order to keep the compiler quiet, we add some if-def to exclude these functions in this case.
2019-03-04[socket] Some minor cleanup and commentsMicael Karlberg
2019-03-04[socket] Macro abuse for requestor queue func defMicael Karlberg
The requestor (acceptor, writer and reader) functions are virtually identical, so to ensure quality and not having to write the exact same functions three times, we make use of some macro magic for their declaration. OTP-15565
2019-03-04[net] Macro abuse for func defMicael Karlberg
Some more macro abuse for nif API callback functions. OTP-15565
2019-03-04[socket] Macro abuse for more func defMicael Karlberg
Some more macro abuse for nif API callback functions and the operator (acceptor, writer and reader) queue wrapper functions (search4pid, push, pop and unqueue). OTP-15565
2019-03-04[socket] Macro abuse for setopt(otp) and getopt(otp)Micael Karlberg
2019-03-04[socket|net] Macro abuseMicael Karlberg
Make use of macro concat magic to simplify declarations. OTP-15565
2019-03-04Merge branch 'bmk/20190301/socket_test_cleanup'Micael Karlberg
2019-03-04Merge branch 'maint'Siri Hansen
2019-03-04Merge branch 'siri/logger/os-timestamp/OTP-15625' into maintSiri Hansen
* siri/logger/os-timestamp/OTP-15625: Update preloaded [logger] Change timestamp from erlang:system_time to os:system_time
2019-03-04Merge branch 'bmk/20190301/net_test/OTP-15635'Micael Karlberg
2019-03-04Merge pull request #2167 from bjorng/bjorn/tune-beamBjörn Gustavsson
Tune BEAM instructions for the new compiler (part 1)
2019-03-01Add a howto for counting instructionsBjörn Gustavsson
2019-03-01Combine is_nonempty_list with get_hd/get_tlBjörn Gustavsson
The is_nonempty_list test is very frequently followed by get_tl, and frequently followed by get_hd.
2019-03-01Remove the combined instruction is_nonempty_list_test_heapBjörn Gustavsson
It turns out that the combination of is_nonempty_list and test_heap is no longer frequent.
2019-03-01Combine more init instructionsBjörn Gustavsson
2019-03-01Combine test_arity with get_tuple_elementBjörn Gustavsson
The test_arity instruction is often followed by get_tuple_element.
2019-03-01Combine get_tuple_element when destinations are not consecutiveBjörn Gustavsson
2019-03-01[socket|test] Quiet logger and ttest improvementsMicael Karlberg
Add a quiet logger mode (default) which limits the printouts in the (erlang) shell (the web log will be as verbose as usual). Also added a way to configure the runtime of the ttest cases.
2019-03-01[socket|test] Moved old test modulesMicael Karlberg
Moved the old socket test modules into its own (temporary?) directory.
2019-03-01[net] Fixed name_and_addr_info test caseMicael Karlberg
The test case did not consider that the machine might have both IPv4 (inet) and IPv6 (inet6) domain interfaces. OTP-15635
2019-03-01[net] Fixed getnameinfo functionMicael Karlberg
The getnameinfo function has been fixed: 1) Faulty sockaddr decode success check 2) Incorrect (name info) return value OTP-15636
2019-03-01[net|test] Add "proper" test suiteMicael Karlberg
Add a (basically) placeholder test suite for the net module. OTP-15635
2019-02-28Remove rarely used swap instructionsBjörn Gustavsson
`swap x y` is rarely or never used. I found a single use of `swap_temp x y x` in the sample of modules compiled by `scripts/diffable`.
2019-02-28Tune move instructionsBjörn Gustavsson
Of the `move_dup` instructions, only `move_dup x x x` was frequently used. Remove the other register combinations. With those instruction `move_dup` instructions removed, it is necessary to add new predicates to avoid unsafe translation to `move_shift` and `move2_par`. Also add additional transformations to transform more `move` instructions into `move2_par`. The existing transformation would require the `move` instructions to be in the "right" order in order to be transformed. Remove `move3 x y x y x y` because it turns out to be rarely executed.
2019-02-28erts: Stop using madvise(2) on SolarisJohn Högberg
inet_drv adds some arcane #defines to get SCTP working, which may end up disabling madvise(2) locally in that file, breaking the build in the process. This commit disables madvise(2) altogether on Solaris as it's far simpler than undoing the define dance in erl_mmap.h.
2019-02-27Revert "Prepare release"Rickard Green
This reverts commit df130102cdeca8d35fec95a0c926fd1cfec54eab.
2019-02-26Prepare releaseErlang/OTP
2019-02-25Merge pull request #2124 from kjellwinblad/kjell/stdlib/iolist_size_trapKjell Winblad
Make iolist_size/1 yield OTP-15631
2019-02-25Make iolist_size/1 yieldKjell Winblad
The iolist_size/1 function did not yield even if the input list was very long and a call to the function did only consume a single reduction. This commit fixes these problems.
2019-02-23Merge branch 'maint'Rickard Green
* maint: erts: Fix macro redefinition
2019-02-22erts: Fix macro redefinitionBjörn-Egil Dahlberg
LIST_NEXT and LIST_PREV causes macro redefinitions from other include files. beam/erl_ao_firstfit_alloc.c:103:9: warning: 'LIST_NEXT' macro redefined [-Wmacro-redefined] ^ /usr/include/sys/queue.h:507:9: note: previous definition is here ^ 1 warning generated. beam/erl_bestfit_alloc.c:125:9: warning: 'LIST_NEXT' macro redefined [-Wmacro-redefined] ^ /usr/include/sys/queue.h:507:9: note: previous definition is here ^
2019-02-22Merge branch 'bmk/20190204/socket_as_nif/OTP-14831'Micael Karlberg
2019-02-22[socket] Cleanup and accept restructureMicael Karlberg
Some cleanup (of open, bind, connect) and rewrote the accept code (moved the code into smaller functions). OTP-14831
2019-02-22[socket] More fixes to socket closeMicael Karlberg
Better handling of socket close. The 'closeRef' needed its own environment to make if work in both cases (both called and scheduled). Also Introduced the enif select wrapper functions (read, write, stop and cancel). Also add error handling at every time one of these functions are called. OTP-14831
2019-02-22[socket] Fixed socket close bugMicael Karlberg
Fixed a raise condition bug in the socket_stop (callback) function that could result in the socket actually *not* beeing closed. OTP-14831
2019-02-22[socket-nif] Fix buggy use of NULL-monitorSverker Eriksson
Assert failed in enif_demonitor when called with "NULL-monitor". Replaced null monitor with separate 'is_active' boolean and added my_make_monitor_term for printing (to be replaced with enif_make_monitor_term).
2019-02-22[socket-nif] Fix bug in message sendingSverker Eriksson
Asserts failed in debug vm as msg term was built from mixed ErlNifEnv's.
2019-02-22[socket|test] Some improvements to (esock) ttestMicael Karlberg
Add a quiet mode for ttest which is used when running in a (terminal) shell. Moved the esock-ttest script(s) into their own directory. Minor improvements to the (client) result printout. Also fixed copyright (end) dates. OTP-14831
2019-02-22[socket] Local address on macOS MojaveMicael Karlberg
Fixed how to figure out local address on macOS Mojave. OTP-14831
2019-02-22[socket-nif] Fix memorys leaks in recv error casesSverker Eriksson
and collapsed some duplicate code
2019-02-22[socket-nif] Fix currentReader/Writer always set at enif_selectSverker Eriksson
2019-02-22[socket-nif] Rename 'nosup' -> 'notsup'Sverker Eriksson
as called in crypto.erl and erlang.erl.
2019-02-22[logger] Change timestamp from erlang:system_time to os:system_timeSiri Hansen
This is to align the timestamps with external logs.
2019-02-22Merge PR-2147 from sverker/sverker/enif-null-pid/OTP-15011Sverker Eriksson
Add enif_set_pid_undefined & enif_is_pid_undefined
2019-02-22Merge branch ↵Lukas Larsson
'lukas/erts/fragment-dist-messages/OTP-13397/OTP-15610/OTP-15611/OTP-15612/OTP-15613' * lukas/erts/fragment-dist-messages/OTP-13397/OTP-15610/OTP-15611/OTP-15612/OTP-15613: erts: Add debug dist obuf memory leak check win32: Fix ./otp_build debuginfo_win32 Make ld.sh on windows print better error reason erts: Fix so that externals with creation 0 compare equal to all erts: Expand etp to look for free processes erts: Implement trapping while sending distr exit/down erts: Add ERL_NODE_BOOKKEEP to node tables refc erts: Refactor ErtsSendContext to be ErtsDSigSendContext erts: Add distr testcases for fragmentation erts: Make remote send of exit/2 trap erts: Implement fragmentation of distrubution messages erts: Expand distribution protocol documentation erts: Move reason in dist messages to payload erts: Remove a copy of distribution data payload erts: Yield later during process exit and allow free procs to run erts: Refactor rbt _yielding to use reductions erts: Limit binary printout for %.XT in erts_print
2019-02-22erts: Add debug dist obuf memory leak checkLukas Larsson
2019-02-22erts: Fix so that externals with creation 0 compare equal to allLukas Larsson
The special creation of 0 is used by internally created externals, such as when list_to_pid is called. This creation should compare equal to all externals creations of that external. If it does not we can end up in very strange scenarios. For instance: > P = spawn(OtherNode, fun() -> die end). <8303.60.0> > link(<8303.60.0>). true > flush(). ok OTP-15613