diff options
author | Sverker Eriksson <[email protected]> | 2017-02-09 17:30:30 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2017-02-09 17:30:30 +0100 |
commit | a8d5234c77634df9522727ff200cef4fcab49c22 (patch) | |
tree | 51c3d51eaab4510928d0439265eb0613bac3a68d /erts/emulator/beam | |
parent | d85e74e0c0e4bc66c875e2fd5f54d89255df0047 (diff) | |
download | otp-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')
-rw-r--r-- | erts/emulator/beam/erl_drv_nif.h | 8 | ||||
-rw-r--r-- | erts/emulator/beam/erl_nif.h | 6 |
2 files changed, 6 insertions, 8 deletions
diff --git a/erts/emulator/beam/erl_drv_nif.h b/erts/emulator/beam/erl_drv_nif.h index 8de4a7855d..2d21dac87a 100644 --- a/erts/emulator/beam/erl_drv_nif.h +++ b/erts/emulator/beam/erl_drv_nif.h @@ -56,14 +56,6 @@ enum ErlNifSelectFlags { ERL_NIF_SELECT_STOP = (1 << 2) }; -enum ErlNifSelectReturn { - ERL_NIF_SELECT_ERROR = (1 << 0), - ERL_NIF_SELECT_STOP_CALLED = (1 << 1), - ERL_NIF_SELECT_STOP_SCHEDULED = (1 << 2), - ERL_NIF_SELECT_INVALID_EVENT = (1 << 3), - ERL_NIF_SELECT_FAILED = (1 << 4) -}; - /* * A driver monitor */ 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, |