aboutsummaryrefslogtreecommitdiffstats
path: root/erts/doc/src/erl_nif.xml
diff options
context:
space:
mode:
Diffstat (limited to 'erts/doc/src/erl_nif.xml')
-rw-r--r--erts/doc/src/erl_nif.xml60
1 files changed, 31 insertions, 29 deletions
diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml
index b2e2254a65..8b02b3bae1 100644
--- a/erts/doc/src/erl_nif.xml
+++ b/erts/doc/src/erl_nif.xml
@@ -518,13 +518,15 @@ ok
</item>
<tag><marker id="reload"/>int (*reload)(ErlNifEnv* env, void** priv_data, ERL_NIF_TERM load_info)</tag>
- <note><p>The reload mechanism is <em>deprecated</em>. It was only intended
- as a development feature. Do not use it as an upgrade method for
- live production systems. It might be removed in future releases. Be sure
- to pass <c>reload</c> as <c>NULL</c> to <seealso marker="#ERL_NIF_INIT">ERL_NIF_INIT</seealso>
- to disable it when not used.</p>
- </note>
- <item><p><c>reload</c> is called when the NIF library is loaded
+
+ <item>
+ <note><p>The reload mechanism is <em>deprecated</em>. It was only intended
+ as a development feature. Do not use it as an upgrade method for
+ live production systems. It might be removed in future releases. Be sure
+ to pass <c>reload</c> as <c>NULL</c> to <seealso marker="#ERL_NIF_INIT">ERL_NIF_INIT</seealso>
+ to disable it when not used.</p>
+ </note>
+ <p><c>reload</c> is called when the NIF library is loaded
and there is already a previously loaded library for this
module code.</p>
<p>Works the same as <c>load</c>. The only difference is that
@@ -583,9 +585,9 @@ ok
<p/>
<code type="none">
typedef struct {
- const char* <em>name</em>;
- unsigned <em>arity</em>;
- ERL_NIF_TERM (*<em>fptr</em>)(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
+ const char* name;
+ unsigned arity;
+ ERL_NIF_TERM (*fptr)(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
unsigned flags;
} ErlNifFunc;
</code>
@@ -618,8 +620,8 @@ typedef struct {
<p/>
<code type="none">
typedef struct {
- unsigned <em>size</em>;
- unsigned char* <em>data</em>;
+ unsigned size;
+ unsigned char* data;
} ErlNifBinary;
</code>
<p><c>ErlNifBinary</c> contains transient information about an
@@ -1812,23 +1814,23 @@ enif_map_iterator_destroy(env, &amp;iter);
</p></desc>
</func>
<func><name><ret>int</ret><nametext>enif_thread_type(void)</nametext></name>
- <fsummary>Determine type of current thread</fsummary>
- <desc>
- <p>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):</p>
- <taglist>
- <tag><c>ERL_NIF_THR_UNDEFINED</c></tag>
- <value><p>Undefined thread that is not a scheduler thread.</p></value>
- <tag><c>ERL_NIF_THR_NORMAL_SCHEDULER</c></tag>
- <value><p>A normal scheduler thread.</p></value>
- <tag><c>ERL_NIF_THR_DIRTY_CPU_SCHEDULER</c></tag>
- <value><p>A dirty CPU scheduler thread.</p></value>
- <tag><c>ERL_NIF_THR_DIRTY_IO_SCHEDULER</c></tag>
- <value><p>A dirty I/O scheduler thread.</p></value>
- </taglist>
- </desc>
+ <fsummary>Determine type of current thread</fsummary>
+ <desc>
+ <p>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):</p>
+ <taglist>
+ <tag><c>ERL_NIF_THR_UNDEFINED</c></tag>
+ <item><p>Undefined thread that is not a scheduler thread.</p></item>
+ <tag><c>ERL_NIF_THR_NORMAL_SCHEDULER</c></tag>
+ <item><p>A normal scheduler thread.</p></item>
+ <tag><c>ERL_NIF_THR_DIRTY_CPU_SCHEDULER</c></tag>
+ <item><p>A dirty CPU scheduler thread.</p></item>
+ <tag><c>ERL_NIF_THR_DIRTY_IO_SCHEDULER</c></tag>
+ <item><p>A dirty I/O scheduler thread.</p></item>
+ </taglist>
+ </desc>
</func>
<func>
<name><ret>ErlNifTime</ret><nametext>enif_time_offset(ErlNifTimeUnit time_unit)</nametext></name>