diff options
author | Rickard Green <[email protected]> | 2012-08-08 02:20:05 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2012-12-03 21:18:05 +0100 |
commit | b434a3ab242dde66e23a72122474854f51a61eff (patch) | |
tree | f205873230fb86943e6667c0b0de2e2563c82d1e /erts/emulator/beam/erl_node_tables.c | |
parent | 3b523c25af0df45fbf68ab3cf50c0556f1d4e0a1 (diff) | |
download | otp-b434a3ab242dde66e23a72122474854f51a61eff.tar.gz otp-b434a3ab242dde66e23a72122474854f51a61eff.tar.bz2 otp-b434a3ab242dde66e23a72122474854f51a61eff.zip |
Prepare for use of ptab functionality also for ports
Diffstat (limited to 'erts/emulator/beam/erl_node_tables.c')
-rw-r--r-- | erts/emulator/beam/erl_node_tables.c | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/erts/emulator/beam/erl_node_tables.c b/erts/emulator/beam/erl_node_tables.c index f64a7fa41a..3b400ce0de 100644 --- a/erts/emulator/beam/erl_node_tables.c +++ b/erts/emulator/beam/erl_node_tables.c @@ -1319,12 +1319,12 @@ setup_reference_table(void) /* Insert Heap */ insert_offheap(&(proc->off_heap), HEAP_REF, - proc->id); + proc->common.id); /* Insert message buffers */ for(hfp = proc->mbuf; hfp; hfp = hfp->next) insert_offheap(&(hfp->off_heap), HEAP_REF, - proc->id); + proc->common.id); /* Insert msg msg buffers */ for (msg = proc->msg.first; msg; msg = msg->next) { ErlHeapFragment *heap_frag = NULL; @@ -1334,7 +1334,7 @@ setup_reference_table(void) else { if (msg->data.dist_ext->dep) insert_dist_entry(msg->data.dist_ext->dep, - HEAP_REF, proc->id, 0); + HEAP_REF, proc->common.id, 0); if (is_not_nil(ERL_MESSAGE_TOKEN(msg))) heap_frag = erts_dist_ext_trailer(msg->data.dist_ext); } @@ -1342,7 +1342,7 @@ setup_reference_table(void) if (heap_frag) insert_offheap(&(heap_frag->off_heap), HEAP_REF, - proc->id); + proc->common.id); } #ifdef ERTS_SMP for (msg = proc->msg_inq.first; msg; msg = msg->next) { @@ -1353,7 +1353,7 @@ setup_reference_table(void) else { if (msg->data.dist_ext->dep) insert_dist_entry(msg->data.dist_ext->dep, - HEAP_REF, proc->id, 0); + HEAP_REF, proc->common.id, 0); if (is_not_nil(ERL_MESSAGE_TOKEN(msg))) heap_frag = erts_dist_ext_trailer(msg->data.dist_ext); } @@ -1361,19 +1361,19 @@ setup_reference_table(void) if (heap_frag) insert_offheap(&(heap_frag->off_heap), HEAP_REF, - proc->id); + proc->common.id); } #endif /* Insert links */ - if(proc->nlinks) - insert_links(proc->nlinks, proc->id); - if(proc->monitors) - insert_monitors(proc->monitors, proc->id); + if (ERTS_P_LINKS(proc)) + insert_links(ERTS_P_LINKS(proc), proc->common.id); + if (ERTS_P_MONITORS(proc)) + insert_monitors(ERTS_P_MONITORS(proc), proc->common.id); /* Insert controller */ { DistEntry *dep = ERTS_PROC_GET_DIST_ENTRY(proc); if (dep) - insert_dist_entry(dep, CTRL_REF, proc->id, 0); + insert_dist_entry(dep, CTRL_REF, proc->common.id, 0); } } } @@ -1389,16 +1389,19 @@ setup_reference_table(void) continue; /* Insert links */ - if(erts_port[i].nlinks) - insert_links(erts_port[i].nlinks, erts_port[i].id); + if (ERTS_P_LINKS(&erts_port[i])) + insert_links(ERTS_P_LINKS(&erts_port[i]), erts_port[i].common.id); + /* Insert monitors */ + if (ERTS_P_MONITORS(&erts_port[i])) + insert_monitors(ERTS_P_MONITORS(&erts_port[i]), erts_port[i].common.id); /* Insert port data */ for(hfp = erts_port[i].bp; hfp; hfp = hfp->next) - insert_offheap(&(hfp->off_heap), HEAP_REF, erts_port[i].id); + insert_offheap(&(hfp->off_heap), HEAP_REF, erts_port[i].common.id); /* Insert controller */ if (erts_port[i].dist_entry) insert_dist_entry(erts_port[i].dist_entry, CTRL_REF, - erts_port[i].id, + erts_port[i].common.id, 0); } |