aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/global.h
diff options
context:
space:
mode:
authorSteve Vinoski <vinoski@ieee.org>2015-12-23 21:09:19 -0500
committerRickard Green <rickard@erlang.org>2016-05-31 15:13:50 +0200
commit60557173f8a7bd0d4deafdb2b3e066899c586f56 (patch)
tree280984f50391176714f4ed1b9eb19cdabd3369b3 /erts/emulator/beam/global.h
parentf0510a55fdc2591ea71107f77e36d6fc7b001874 (diff)
downloadotp-60557173f8a7bd0d4deafdb2b3e066899c586f56.tar.gz
otp-60557173f8a7bd0d4deafdb2b3e066899c586f56.tar.bz2
otp-60557173f8a7bd0d4deafdb2b3e066899c586f56.zip
Add dirty_process_main function
Dirty schedulers only execute NIFs, so having them execute the full process_main function isn't necessary. Add dirty_process_main for dirty schedulers to execute instead. Add erts_pre_dirty_nif(), called when preparing to execute a dirty nif. Add more dirty NIF tests to verify that activities requiring the process main lock can succeed when the process is executing a dirty NIF.
Diffstat (limited to 'erts/emulator/beam/global.h')
-rw-r--r--erts/emulator/beam/global.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/erts/emulator/beam/global.h b/erts/emulator/beam/global.h
index b76b9cd874..15253bb53e 100644
--- a/erts/emulator/beam/global.h
+++ b/erts/emulator/beam/global.h
@@ -62,6 +62,8 @@ struct enif_environment_t /* ErlNifEnv */
extern void erts_pre_nif(struct enif_environment_t*, Process*,
struct erl_module_nif*, Process* tracee);
extern void erts_post_nif(struct enif_environment_t* env);
+extern void erts_pre_dirty_nif(struct enif_environment_t*, Process*,
+ struct erl_module_nif*, Process* tracee);
extern Eterm erts_nif_taints(Process* p);
extern void erts_print_nif_taints(int to, void* to_arg);
void erts_unload_nif(struct erl_module_nif* nif);
@@ -1152,6 +1154,7 @@ void print_pass_through(int, byte*, int);
int catchlevel(Process*);
void init_emulator(void);
void process_main(void);
+void dirty_process_main(void);
Eterm build_stacktrace(Process* c_p, Eterm exc);
Eterm expand_error_value(Process* c_p, Uint freason, Eterm Value);
void erts_save_stacktrace(Process* p, struct StackTrace* s, int depth);