diff options
author | John Högberg <[email protected]> | 2017-09-06 12:42:28 +0200 |
---|---|---|
committer | John Högberg <[email protected]> | 2017-09-06 13:48:51 +0200 |
commit | 0cc04010ae73fcb591be4f35c00eb61b653cc0d0 (patch) | |
tree | 01f3790ea5682742297cb786cd676fb49ae21dc0 /erts/emulator/beam/erl_nif.h | |
parent | 28759f8cbde480be7782bac9169eeb9e4fb60bce (diff) | |
parent | ad5d9eef3f41274f08008cdbb43afb2088d3276e (diff) | |
download | otp-0cc04010ae73fcb591be4f35c00eb61b653cc0d0.tar.gz otp-0cc04010ae73fcb591be4f35c00eb61b653cc0d0.tar.bz2 otp-0cc04010ae73fcb591be4f35c00eb61b653cc0d0.zip |
Merge branch 'maint' into john/erts/merge-zlib-and-vector-q
Diffstat (limited to 'erts/emulator/beam/erl_nif.h')
-rw-r--r-- | erts/emulator/beam/erl_nif.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_nif.h b/erts/emulator/beam/erl_nif.h index b0d5c39798..d195721054 100644 --- a/erts/emulator/beam/erl_nif.h +++ b/erts/emulator/beam/erl_nif.h @@ -50,6 +50,7 @@ ** 2.9: 18.2 enif_getenv ** 2.10: Time API ** 2.11: 19.0 enif_snprintf +** 2.12: 20.0 add enif_queue */ #define ERL_NIF_MAJOR_VERSION 2 #define ERL_NIF_MINOR_VERSION 12 @@ -241,6 +242,28 @@ typedef enum { ERL_NIF_PHASH2 = 2 } ErlNifHash; +#define ERL_NIF_IOVEC_SIZE 16 + +typedef struct erl_nif_io_vec { + int iovcnt; /* length of vectors */ + size_t size; /* total size in bytes */ + SysIOVec *iov; + + /* internals (avert your eyes) */ + void **ref_bins; /* Binary[] */ + int flags; + + /* Used when stack allocating the io vec */ + SysIOVec small_iov[ERL_NIF_IOVEC_SIZE]; + void *small_ref_bin[ERL_NIF_IOVEC_SIZE]; +} ErlNifIOVec; + +typedef struct erts_io_queue ErlNifIOQueue; + +typedef enum { + ERL_NIF_IOQ_NORMAL = 1 +} ErlNifIOQueueOpts; + /* * Return values from enif_thread_type(). Negative values * reserved for specific types of non-scheduler threads. |