Skip to content

Commit f37766c

Browse files
committed
---
yaml --- r: 463 b: refs/heads/master c: 56cd4e4 h: refs/heads/master i: 461: be3cba7 459: a8e0e32 455: 82ff085 447: 0c0acc5 v: v3
1 parent 7be1a60 commit f37766c

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: c5744c8aefa1c9f74e779af2c5ceb852640b28b7
2+
refs/heads/master: 56cd4e458a6c3cd40a8ee2ceb0a0fdab0352bf20

trunk/src/rt/rust_dom.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
template class ptr_vec<rust_task>;
66

7+
// Keeps track of all live domains, for debugging purposes.
8+
array_list<rust_dom*> _live_domains;
79

810
rust_dom::rust_dom(rust_srv *srv, rust_crate const *root_crate) :
911
interrupt_flag(0),
@@ -26,6 +28,10 @@ rust_dom::rust_dom(rust_srv *srv, rust_crate const *root_crate) :
2628
pthread_attr_setdetachstate(&attr, true);
2729
#endif
2830
root_task = new (this) rust_task(this, NULL);
31+
32+
if (_live_domains.replace(NULL, this) == false) {
33+
_live_domains.append(this);
34+
}
2935
}
3036

3137
static void
@@ -73,6 +79,8 @@ rust_dom::~rust_dom() {
7379
#endif
7480
while (caches.length())
7581
delete caches.pop();
82+
83+
_live_domains.replace(this, NULL);
7684
}
7785

7886
void
@@ -321,6 +329,13 @@ rust_dom::schedule_task()
321329
return NULL;
322330
}
323331

332+
void
333+
rust_dom::log_all_state() {
334+
for (uint32_t i = 0; i < _live_domains.size(); i++) {
335+
_live_domains[i]->log_state();
336+
}
337+
}
338+
324339
void
325340
rust_dom::log_state() {
326341
if (!running_tasks.is_empty()) {

trunk/src/rt/rust_dom.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ struct rust_dom
8484
int start_main_loop();
8585

8686
void log_state();
87+
static void log_all_state();
8788
};
8889

8990
//

0 commit comments

Comments
 (0)