aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/break.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2017-02-23 19:48:00 +0100
committerSverker Eriksson <[email protected]>2017-02-23 19:48:00 +0100
commita5638411f2d16f6648bb1c904206079df00d2471 (patch)
tree4a7c7ca6073a1b84e37112a7c4ee556ce4877099 /erts/emulator/beam/break.c
parent9c07c8727f440b408dc2542634812ca944e97c78 (diff)
parent0e566efe903fd2482c51762f1939bc292dca43e7 (diff)
downloadotp-a5638411f2d16f6648bb1c904206079df00d2471.tar.gz
otp-a5638411f2d16f6648bb1c904206079df00d2471.tar.bz2
otp-a5638411f2d16f6648bb1c904206079df00d2471.zip
Merge branch 'sverker/enif_select/OTP-13684'
* sverker/enif_select: (31 commits) Remove debug printout and comment Fix nif_SUITE:select for old linux Add docs for enif_compare_monitors and ErlNifMonitor Fix ErlNifMonitor handling Remove faulty debug ASSERT erts: Skip nif_SUITE:select on windows Fix enif_select for windows Fix whitebox monitor tests Fix erl_nif doc Expand nif_SUITE:monitor_frenzy to verify dtor calls Expand nif_SUITE:monitor_frenzy with binary_to_term erts: Avoid revival of dying resource by dec_term erts: Add enif_compare_monitors erts: Try fix enif_select for windows erts: Change return value for enif_select erts: Add pid argument to enif_select erts: Beautify enif_select erts: Fix bad_fd_in_pollset error case for enif_select erts: Add enif_monitor_process and enif_demonitor_process erts: Rename ErlNifResource as ErtsResource ...
Diffstat (limited to 'erts/emulator/beam/break.c')
-rw-r--r--erts/emulator/beam/break.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/erts/emulator/beam/break.c b/erts/emulator/beam/break.c
index b9c272d6d5..4dad5736c5 100644
--- a/erts/emulator/beam/break.c
+++ b/erts/emulator/beam/break.c
@@ -178,19 +178,28 @@ static void doit_print_monitor(ErtsMonitor *mon, void *vpcontext)
prefix = "";
}
- if (mon->type == MON_ORIGIN) {
- if (is_atom(mon->pid)) { /* dist by name */
- ASSERT(is_node_name_atom(mon->pid));
+ switch (mon->type) {
+ case MON_ORIGIN:
+ if (is_atom(mon->u.pid)) { /* dist by name */
+ ASSERT(is_node_name_atom(mon->u.pid));
erts_print(to, to_arg, "%s{to,{%T,%T},%T}", prefix, mon->name,
- mon->pid, mon->ref);
+ mon->u.pid, mon->ref);
} else if (is_atom(mon->name)){ /* local by name */
erts_print(to, to_arg, "%s{to,{%T,%T},%T}", prefix, mon->name,
erts_this_dist_entry->sysname, mon->ref);
} else { /* local and distributed by pid */
- erts_print(to, to_arg, "%s{to,%T,%T}", prefix, mon->pid, mon->ref);
+ erts_print(to, to_arg, "%s{to,%T,%T}", prefix, mon->u.pid, mon->ref);
}
- } else { /* MON_TARGET */
- erts_print(to, to_arg, "%s{from,%T,%T}", prefix, mon->pid, mon->ref);
+ break;
+ case MON_TARGET:
+ erts_print(to, to_arg, "%s{from,%T,%T}", prefix, mon->u.pid, mon->ref);
+ break;
+ case MON_NIF_TARGET: {
+ ErtsResource* rsrc = mon->u.resource;
+ erts_print(to, to_arg, "%s{from,{%T,%T},%T}", prefix, rsrc->type->module,
+ rsrc->type->name, mon->ref);
+ break;
+ }
}
}