aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_nif.h
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2017-02-09 17:30:30 +0100
committerSverker Eriksson <[email protected]>2017-02-09 17:30:30 +0100
commita8d5234c77634df9522727ff200cef4fcab49c22 (patch)
tree51c3d51eaab4510928d0439265eb0613bac3a68d /erts/emulator/beam/erl_nif.h
parentd85e74e0c0e4bc66c875e2fd5f54d89255df0047 (diff)
downloadotp-a8d5234c77634df9522727ff200cef4fcab49c22.tar.gz
otp-a8d5234c77634df9522727ff200cef4fcab49c22.tar.bz2
otp-a8d5234c77634df9522727ff200cef4fcab49c22.zip
erts: Change return value for enif_select
to negative int as error and positive as success.
Diffstat (limited to 'erts/emulator/beam/erl_nif.h')
-rw-r--r--erts/emulator/beam/erl_nif.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_nif.h b/erts/emulator/beam/erl_nif.h
index 5248f287ee..9ff28a30cc 100644
--- a/erts/emulator/beam/erl_nif.h
+++ b/erts/emulator/beam/erl_nif.h
@@ -142,6 +142,12 @@ typedef struct
typedef int ErlNifEvent; /* An event to be selected on. */
//#endif
+/* Return bits from enif_select: */
+#define ERL_NIF_SELECT_STOP_CALLED (1 << 0)
+#define ERL_NIF_SELECT_STOP_SCHEDULED (1 << 1)
+#define ERL_NIF_SELECT_INVALID_EVENT (1 << 2)
+#define ERL_NIF_SELECT_FAILED (1 << 3)
+
typedef enum
{
ERL_NIF_RT_CREATE = 1,