From 30d5b7ee32d099f2a23c26e873aeb08be1b1d966 Mon Sep 17 00:00:00 2001
From: Sverker Eriksson
Date: Thu, 15 Mar 2018 17:14:39 +0100
Subject: erts: Add enif_*_name functions
---
erts/doc/src/erl_nif.xml | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
(limited to 'erts/doc/src')
diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml
index 9b446615a4..9d92e87baa 100644
--- a/erts/doc/src/erl_nif.xml
+++ b/erts/doc/src/erl_nif.xml
@@ -1103,6 +1103,16 @@ typedef struct {
+
+ char*
+ enif_cond_name(ErlNifCond* cnd)
+
+
+ Same as
+ erl_drv_cond_name.
+
+
+
void
enif_cond_signal(ErlNifCond *cnd)
@@ -2626,6 +2636,16 @@ enif_map_iterator_destroy(env, &iter);
+
+ char*
+ enif_mutex_name(ErlNifMutex* mtx)
+
+
+ Same as
+ erl_drv_mutex_name.
+
+
+
int
enif_mutex_trylock(ErlNifMutex *mtx)
@@ -2870,6 +2890,16 @@ enif_map_iterator_destroy(env, &iter);
+
+ char*
+ enif_rwlock_name(ErlNifRWLock* rwlck)
+
+
+ Same as
+ erl_drv_rwlock_name.
+
+
+
void
enif_rwlock_rlock(ErlNifRWLock *rwlck)
@@ -3211,6 +3241,16 @@ if (retval & ERL_NIF_SELECT_STOP_CALLED) {
+
+ char*
+ enif_thread_name(ErlNifTid tid)
+ Thread name
+
+ Same as
+ erl_drv_thread_name.
+
+
+
ErlNifThreadOpts *
enif_thread_opts_create(char *name)
--
cgit v1.2.3
From e36c103236ac70c29caf910d31651bed6c24dfe8 Mon Sep 17 00:00:00 2001
From: Sverker Eriksson
Date: Thu, 15 Mar 2018 21:02:47 +0100
Subject: erts: Add enif_vfprintf and enif_vsnprintf
---
erts/doc/src/erl_nif.xml | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
(limited to 'erts/doc/src')
diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml
index 9d92e87baa..1daac88d47 100644
--- a/erts/doc/src/erl_nif.xml
+++ b/erts/doc/src/erl_nif.xml
@@ -875,7 +875,7 @@ typedef enum {
-
An enumeration of the properties that can be requested from
- enif_unique_integer.
+ enif_make_unique_integer.
For default properties, use value 0.
ERL_NIF_UNIQUE_POSITIVE
@@ -3367,6 +3367,30 @@ if (retval & ERL_NIF_SELECT_STOP_CALLED) {
+
+ int
+ enif_vfprintf(FILE *stream, const char *format, va_list ap)
+
+ Format strings and Erlang terms.
+
+ Equivalent to enif_fprintf
+ except that its called with a va_list instead of a variable number of
+ arguments.
+
+
+
+
+ int
+ enif_vsnprintf(char *str, size_t size, const char *format, va_list ap)
+
+ Format strings and Erlang terms.
+
+ Equivalent to enif_snprintf
+ except that its called with a va_list instead of a variable number of
+ arguments.
+
+
+
int
enif_whereis_pid(ErlNifEnv *env,
--
cgit v1.2.3
From 97a5f6c89c7b937e0a1192e02a7dc94f64f558cf Mon Sep 17 00:00:00 2001
From: Sverker Eriksson
Date: Fri, 16 Mar 2018 17:11:39 +0100
Subject: erts: Add statement about errno to enif_*printf docs
---
erts/doc/src/erl_nif.xml | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
(limited to 'erts/doc/src')
diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml
index 1daac88d47..6b9ca971dc 100644
--- a/erts/doc/src/erl_nif.xml
+++ b/erts/doc/src/erl_nif.xml
@@ -1252,7 +1252,8 @@ typedef struct {
Similar to fprintf but this format string also accepts
"%T", which formats Erlang terms.
This function was originally intenden for debugging purpose. It is not
- recommended to print very large terms with %T.
+ recommended to print very large terms with %T. The function may
+ change errno, even if successful.
@@ -3178,7 +3179,8 @@ if (retval & ERL_NIF_SELECT_STOP_CALLED) {
Similar to snprintf but this format string also accepts
"%T", which formats Erlang terms.
This function was originally intenden for debugging purpose. It is not
- recommended to print very large terms with %T.
+ recommended to print very large terms with %T. The function may
+ change errno, even if successful.
--
cgit v1.2.3
From 0c33c7eb6642adf974fcd2b0426198bd666d28e2 Mon Sep 17 00:00:00 2001
From: Sverker Eriksson
Date: Fri, 16 Mar 2018 20:02:21 +0100
Subject: erts: Remove const from ErlNifResourceDown doc
to conform with erl_nif.h
---
erts/doc/src/erl_nif.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'erts/doc/src')
diff --git a/erts/doc/src/erl_nif.xml b/erts/doc/src/erl_nif.xml
index 6b9ca971dc..5c7d91b9c2 100644
--- a/erts/doc/src/erl_nif.xml
+++ b/erts/doc/src/erl_nif.xml
@@ -809,7 +809,7 @@ typedef void ErlNifResourceDtor(ErlNifEnv* env, void* obj);
ErlNifResourceDown
-
-typedef void ErlNifResourceDown(ErlNifEnv* env, void* obj, const ErlNifPid* pid, const ErlNifMonitor* mon);
+typedef void ErlNifResourceDown(ErlNifEnv* env, void* obj, ErlNifPid* pid, ErlNifMonitor* mon);
The function prototype of a resource down function,
called on the behalf of
enif_monitor_process. obj is the resource, pid
--
cgit v1.2.3