diff options
author | Rickard Green <[email protected]> | 2014-01-28 15:53:03 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2014-01-28 15:53:03 +0100 |
commit | 3c112fbde20a21db0cafc140aa72346f60315b90 (patch) | |
tree | 9355dc94fae68ce2b1d9d08ca0a23484c8c59dfe /erts/emulator/beam/erl_nif.h | |
parent | f65764907faba7ea6ca1a6bb266b6c6612e06b7b (diff) | |
parent | c1c03ae4ee50e58b7669ea88ec4d29c6b2b67c7b (diff) | |
download | otp-3c112fbde20a21db0cafc140aa72346f60315b90.tar.gz otp-3c112fbde20a21db0cafc140aa72346f60315b90.tar.bz2 otp-3c112fbde20a21db0cafc140aa72346f60315b90.zip |
Merge branch 'vinoski/ds'
* vinoski/ds:
initial support for dirty schedulers and dirty NIFs
Diffstat (limited to 'erts/emulator/beam/erl_nif.h')
-rw-r--r-- | erts/emulator/beam/erl_nif.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_nif.h b/erts/emulator/beam/erl_nif.h index 5f4dc21d5c..fb3c359ec9 100644 --- a/erts/emulator/beam/erl_nif.h +++ b/erts/emulator/beam/erl_nif.h @@ -23,7 +23,11 @@ #ifndef __ERL_NIF_H__ #define __ERL_NIF_H__ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif +#include "erl_native_features_config.h" #include "erl_drv_nif.h" /* Version history: @@ -34,9 +38,14 @@ ** 2.2: R14B03 enif_is_exception ** 2.3: R15 enif_make_reverse_list, enif_is_number ** 2.4: R16 enif_consume_timeslice +** 2.5: R17 dirty schedulers */ #define ERL_NIF_MAJOR_VERSION 2 +#ifdef ERL_NIF_DIRTY_SCHEDULER_SUPPORT +#define ERL_NIF_MINOR_VERSION 5 +#else #define ERL_NIF_MINOR_VERSION 4 +#endif #include <stdlib.h> @@ -159,6 +168,14 @@ typedef int ErlNifTSDKey; typedef ErlDrvThreadOpts ErlNifThreadOpts; +#ifdef ERL_NIF_DIRTY_SCHEDULER_SUPPORT +typedef enum +{ + ERL_NIF_DIRTY_JOB_CPU_BOUND = 1, + ERL_NIF_DIRTY_JOB_IO_BOUND = 2 +}ErlNifDirtyTaskFlags; +#endif + #if (defined(__WIN32__) || defined(_WIN32) || defined(_WIN32_)) # define ERL_NIF_API_FUNC_DECL(RET_TYPE, NAME, ARGS) RET_TYPE (*NAME) ARGS typedef struct { |