aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/global.h
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-04-29 17:50:18 +0200
committerSverker Eriksson <[email protected]>2016-05-04 19:53:37 +0200
commit14b81c60f0c6403e9371be420a6df4d414180c68 (patch)
tree13b956613e00ab6776325b27ccd37313ea116efe /erts/emulator/beam/global.h
parent36e9d73aa08930ddf3e3587addfb9a647a41b3e7 (diff)
downloadotp-14b81c60f0c6403e9371be420a6df4d414180c68.tar.gz
otp-14b81c60f0c6403e9371be420a6df4d414180c68.tar.bz2
otp-14b81c60f0c6403e9371be420a6df4d414180c68.zip
erts: Fix PAM to be callable from non-scheduler thread
also simplified the interface to to run PAM from trace
Diffstat (limited to 'erts/emulator/beam/global.h')
-rw-r--r--erts/emulator/beam/global.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/erts/emulator/beam/global.h b/erts/emulator/beam/global.h
index 328bfe344c..baa0a201d1 100644
--- a/erts/emulator/beam/global.h
+++ b/erts/emulator/beam/global.h
@@ -1486,6 +1486,16 @@ do { \
extern Binary *erts_match_set_compile(Process *p, Eterm matchexpr, Eterm MFA);
Eterm erts_match_set_lint(Process *p, Eterm matchexpr);
extern void erts_match_set_release_result(Process* p);
+ERTS_GLB_INLINE void erts_match_set_release_result_trace(Process* p, Eterm);
+
+#if ERTS_GLB_INLINE_INCL_FUNC_DEF
+ERTS_GLB_INLINE
+void erts_match_set_release_result_trace(Process* p, Eterm pam_result)
+{
+ if (is_not_immed(pam_result))
+ erts_match_set_release_result(p);
+}
+#endif /* ERTS_GLB_INLINE_INCL_FUNC_DEF */
enum erts_pam_run_flags {
ERTS_PAM_TMP_RESULT=1,
@@ -1493,12 +1503,12 @@ enum erts_pam_run_flags {
ERTS_PAM_CONTIGUOUS_TUPLE=4,
ERTS_PAM_IGNORE_TRACE_SILENT=8
};
-extern Eterm erts_match_set_run(Process *p,
- Process *self,
- Binary *mpsp,
- Eterm *args, int num_args,
- enum erts_pam_run_flags in_flags,
- Uint32 *return_flags);
+extern Eterm erts_match_set_run_trace(Process *p,
+ Process *self,
+ Binary *mpsp,
+ Eterm *args, int num_args,
+ enum erts_pam_run_flags in_flags,
+ Uint32 *return_flags);
extern Eterm erts_match_set_get_source(Binary *mpsp);
extern void erts_match_prog_foreach_offheap(Binary *b,
void (*)(ErlOffHeap *, void *),