diff options
author | Rickard Green <[email protected]> | 2016-06-08 15:36:07 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2016-06-08 15:36:07 +0200 |
commit | 8de8b36d4a19a79dd1bd1b49a4c394348edd9eac (patch) | |
tree | 2e59ec2743f3bcfe7629fcbc7b199ffebc8eed89 /erts/emulator/beam/erl_nif.h | |
parent | ce33a24033cc8c4cea735b5f2898708ce34f546d (diff) | |
parent | 77192f7f32d4bbe293a6e8cb9da79b8a6dd6b181 (diff) | |
download | otp-8de8b36d4a19a79dd1bd1b49a4c394348edd9eac.tar.gz otp-8de8b36d4a19a79dd1bd1b49a4c394348edd9eac.tar.bz2 otp-8de8b36d4a19a79dd1bd1b49a4c394348edd9eac.zip |
Merge branch 'rickard/misc-ds'
* rickard/misc-ds:
Replace enif_is_on_dirty_scheduler() with enif_thread_type()
No GC on dirty IO schedulers
Diffstat (limited to 'erts/emulator/beam/erl_nif.h')
-rw-r--r-- | erts/emulator/beam/erl_nif.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_nif.h b/erts/emulator/beam/erl_nif.h index da7a754757..494971e118 100644 --- a/erts/emulator/beam/erl_nif.h +++ b/erts/emulator/beam/erl_nif.h @@ -209,6 +209,17 @@ typedef enum { ERL_NIF_BIN2TERM_SAFE = 0x20000000 } ErlNifBinaryToTerm; +/* + * Return values from enif_thread_type(). Negative values + * reserved for specific types of non-scheduler threads. + * Positive values reserved for scheduler thread types. + */ + +#define ERL_NIF_THR_UNDEFINED 0 +#define ERL_NIF_THR_NORMAL_SCHEDULER 1 +#define ERL_NIF_THR_DIRTY_CPU_SCHEDULER 2 +#define ERL_NIF_THR_DIRTY_IO_SCHEDULER 3 + #if (defined(__WIN32__) || defined(_WIN32) || defined(_WIN32_)) # define ERL_NIF_API_FUNC_DECL(RET_TYPE, NAME, ARGS) RET_TYPE (*NAME) ARGS typedef struct { |