diff options
author | Micael Karlberg <[email protected]> | 2019-03-14 17:22:48 +0100 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2019-04-17 16:56:33 +0200 |
commit | 1854d05fb73fb7a787a37e9ada9e4cafdc7a7e84 (patch) | |
tree | 9d1fa8b5ee97d205bc1b0c4880aa7f2aa59b6336 /erts/emulator/nifs/common/socket_int.h | |
parent | 6a5eda1dc70bbfa8f53b2e2c3e79db1748a01bfd (diff) | |
download | otp-1854d05fb73fb7a787a37e9ada9e4cafdc7a7e84.tar.gz otp-1854d05fb73fb7a787a37e9ada9e4cafdc7a7e84.tar.bz2 otp-1854d05fb73fb7a787a37e9ada9e4cafdc7a7e84.zip |
[socket] Make use of the new select (read|write) functions
Make use of the new select functions; enif_select_[read|write],
for read and write select. These functions allows us to construct
the select message ourseves:
{'$socket', Socket, select, Ref}
This is in preparations for when we introduce the 'nowait'
(or something similar) value for the timeout argument (in accept,
read and write funcions).
It also solves (we hope) the term leakage problems (it was difficult
to free the environment when there was only one/socket).
OTP-15496
Diffstat (limited to 'erts/emulator/nifs/common/socket_int.h')
-rw-r--r-- | erts/emulator/nifs/common/socket_int.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/erts/emulator/nifs/common/socket_int.h b/erts/emulator/nifs/common/socket_int.h index fe02e0b051..38c28a6de5 100644 --- a/erts/emulator/nifs/common/socket_int.h +++ b/erts/emulator/nifs/common/socket_int.h @@ -388,5 +388,7 @@ GLOBAL_ERROR_REASON_ATOM_DEFS #define REALLOC_BIN(SZ, BP) enif_realloc_binary((SZ), (BP)) #define FREE_BIN(BP) enif_release_binary((BP)) +/* Copy term T into environment E */ +#define CP_TERM(E, T) enif_make_copy((E), (T)) #endif // SOCKET_INT_H__ |