aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_nif.h
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-11-23 15:55:43 +0100
committerSverker Eriksson <[email protected]>2016-11-23 15:55:43 +0100
commitec776506eac5342da3d45829fb67b669081f6439 (patch)
tree7481f63ae5de72b035eff4c0a7cb92defe383dd3 /erts/emulator/beam/erl_nif.h
parent160a28a0912cf87e971ddcbfdb6f76d64581fe44 (diff)
downloadotp-ec776506eac5342da3d45829fb67b669081f6439.tar.gz
otp-ec776506eac5342da3d45829fb67b669081f6439.tar.bz2
otp-ec776506eac5342da3d45829fb67b669081f6439.zip
erts: Secure abi backward compat for tracer nifs
and simplify the code by handling the compatibility stuff at loading by creating modern struct copies in create_lib().
Diffstat (limited to 'erts/emulator/beam/erl_nif.h')
-rw-r--r--erts/emulator/beam/erl_nif.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/erts/emulator/beam/erl_nif.h b/erts/emulator/beam/erl_nif.h
index 494971e118..413b4f7343 100644
--- a/erts/emulator/beam/erl_nif.h
+++ b/erts/emulator/beam/erl_nif.h
@@ -49,7 +49,7 @@
** 2.8: 18.0 add enif_has_pending_exception
** 2.9: 18.2 enif_getenv
** 2.10: Time API
-** 2.11: 19.0 enif_snprintf
+** 2.11: 19.0 enif_snprintf
*/
#define ERL_NIF_MAJOR_VERSION 2
#define ERL_NIF_MINOR_VERSION 11
@@ -116,12 +116,13 @@ typedef struct enif_entry_t
int (*reload) (ErlNifEnv*, void** priv_data, ERL_NIF_TERM load_info);
int (*upgrade)(ErlNifEnv*, void** priv_data, void** old_priv_data, ERL_NIF_TERM load_info);
void (*unload) (ErlNifEnv*, void* priv_data);
+
+ /* Added in 2.1 */
const char* vm_variant;
- unsigned options;
-}ErlNifEntry;
-/* Field bits for ErlNifEntry options */
-#define ERL_NIF_DIRTY_NIF_OPTION 1
+ /* Added in 2.7 */
+ unsigned options; /* Unused. Can be set to 0 or 1 (dirty sched config) */
+}ErlNifEntry;
typedef struct
@@ -266,8 +267,6 @@ extern TWinDynNifCallbacks WinDynNifCallbacks;
# define ERL_NIF_INIT_DECL(MODNAME) ERL_NIF_INIT_EXPORT ErlNifEntry* nif_init(ERL_NIF_INIT_ARGS)
#endif
-#define ERL_NIF_ENTRY_OPTIONS ERL_NIF_DIRTY_NIF_OPTION
-
#ifdef __cplusplus
}
# define ERL_NIF_INIT_PROLOGUE extern "C" {
@@ -293,7 +292,7 @@ ERL_NIF_INIT_DECL(NAME) \
FUNCS, \
LOAD, RELOAD, UPGRADE, UNLOAD, \
ERL_NIF_VM_VARIANT, \
- ERL_NIF_ENTRY_OPTIONS \
+ 1 \
}; \
ERL_NIF_INIT_BODY; \
return &entry; \