aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_nif.h
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2017-02-24 19:38:37 +0100
committerLukas Larsson <[email protected]>2017-09-05 14:35:26 +0200
commit314702f86c9199957e40edfb73bcdbddb422f9d7 (patch)
tree08421d1740b23964f62eaefa74321528897bb06a /erts/emulator/beam/erl_nif.h
parent520310feef0d76c0f99447187f3574408b219ae5 (diff)
downloadotp-314702f86c9199957e40edfb73bcdbddb422f9d7.tar.gz
otp-314702f86c9199957e40edfb73bcdbddb422f9d7.tar.bz2
otp-314702f86c9199957e40edfb73bcdbddb422f9d7.zip
erts: Add nif ioq
Diffstat (limited to 'erts/emulator/beam/erl_nif.h')
-rw-r--r--erts/emulator/beam/erl_nif.h23
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.