diff options
author | John Högberg <[email protected]> | 2017-09-06 12:38:05 +0200 |
---|---|---|
committer | John Högberg <[email protected]> | 2017-09-06 12:38:05 +0200 |
commit | ad5d9eef3f41274f08008cdbb43afb2088d3276e (patch) | |
tree | 9d3263d517f6e3c20a5f2f855673f20efc302c9f /erts/emulator/beam/erl_nif.h | |
parent | 7394b41b9f254c7f83d508cfc615bd1d63a84507 (diff) | |
parent | eed25a02ba2416c48587699542aaecdd09609718 (diff) | |
download | otp-ad5d9eef3f41274f08008cdbb43afb2088d3276e.tar.gz otp-ad5d9eef3f41274f08008cdbb43afb2088d3276e.tar.bz2 otp-ad5d9eef3f41274f08008cdbb43afb2088d3276e.zip |
Merge branch 'lukas/erts/nif_vector_q/OTP-14598' into maint
OTP-14520
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. |