From 77192f7f32d4bbe293a6e8cb9da79b8a6dd6b181 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Wed, 8 Jun 2016 14:58:33 +0200 Subject: Replace enif_is_on_dirty_scheduler() with enif_thread_type() --- erts/doc/src/erl_nif.xml | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) (limited to 'erts/doc/src') diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml index 4efd155b09..b2e2254a65 100644 --- a/erts/doc/src/erl_nif.xml +++ b/erts/doc/src/erl_nif.xml @@ -1101,15 +1101,6 @@ typedef enum { Erlang operators =:= and =/=.

- intenif_is_on_dirty_scheduler(ErlNifEnv* env) - Check to see if executing on a dirty scheduler thread - -

Check to see if the current NIF is executing on a dirty scheduler thread. If - executing on a dirty scheduler thread true returned; otherwise false.

-

This function can only be used from a NIF-calling thread, and with an - environment corresponding to currently executing processes.

-
-
intenif_is_pid(ErlNifEnv* env, ERL_NIF_TERM term) Determine if a term is a pid

Return true if term is a pid.

@@ -1820,7 +1811,25 @@ enif_map_iterator_destroy(env, &iter);

Same as erl_drv_thread_self.

- + intenif_thread_type(void) + Determine type of current thread + +

Determine the type of currently executing thread. A positive value + indicates a scheduler thread while a negative value or zero indicates + another type of thread. Currently the following specific types exist + (which may be extended in the future):

+ + ERL_NIF_THR_UNDEFINED +

Undefined thread that is not a scheduler thread.

+ ERL_NIF_THR_NORMAL_SCHEDULER +

A normal scheduler thread.

+ ERL_NIF_THR_DIRTY_CPU_SCHEDULER +

A dirty CPU scheduler thread.

+ ERL_NIF_THR_DIRTY_IO_SCHEDULER +

A dirty I/O scheduler thread.

+
+
+
ErlNifTimeenif_time_offset(ErlNifTimeUnit time_unit) Get current Time Offset -- cgit v1.2.3