aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_nif.h
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2016-06-08 14:58:33 +0200
committerRickard Green <[email protected]>2016-06-08 15:20:04 +0200
commit77192f7f32d4bbe293a6e8cb9da79b8a6dd6b181 (patch)
tree2e54e27bb98ad94f46ca265404755862fdd395bf /erts/emulator/beam/erl_nif.h
parent049611f98d67f11f8e06fe0b0fc50eb8ca1925d8 (diff)
downloadotp-77192f7f32d4bbe293a6e8cb9da79b8a6dd6b181.tar.gz
otp-77192f7f32d4bbe293a6e8cb9da79b8a6dd6b181.tar.bz2
otp-77192f7f32d4bbe293a6e8cb9da79b8a6dd6b181.zip
Replace enif_is_on_dirty_scheduler() with enif_thread_type()
Diffstat (limited to 'erts/emulator/beam/erl_nif.h')
-rw-r--r--erts/emulator/beam/erl_nif.h11
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 {