aboutsummaryrefslogtreecommitdiff
path: root/src/rt/rust_dom.h
diff options
context:
space:
mode:
authorJeffrey Yasskin <[email protected]>2010-08-08 19:24:35 -0700
committerJeffrey Yasskin <[email protected]>2010-08-09 11:43:16 +0200
commitb71340552fa0caa870877f87a1273e8d4c91efe6 (patch)
treea1a1883cded2c8541a817d41d91c2002a926207b /src/rt/rust_dom.h
parentFix LLVM translation of modules. (diff)
downloadrust-b71340552fa0caa870877f87a1273e8d4c91efe6.tar.xz
rust-b71340552fa0caa870877f87a1273e8d4c91efe6.zip
Add names to tasks and domains. These can either be an explicit literal string
after the "spawn" keyword, or implicitly the call expression used to start the spawn.
Diffstat (limited to 'src/rt/rust_dom.h')
-rw-r--r--src/rt/rust_dom.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rt/rust_dom.h b/src/rt/rust_dom.h
index 528790d5..abf10cef 100644
--- a/src/rt/rust_dom.h
+++ b/src/rt/rust_dom.h
@@ -25,6 +25,7 @@ struct rust_dom
rust_crate const *root_crate;
rust_log _log;
rust_srv *srv;
+ const char *const name;
ptr_vec<rust_task> running_tasks;
ptr_vec<rust_task> blocked_tasks;
ptr_vec<rust_task> dead_tasks;
@@ -47,7 +48,9 @@ struct rust_dom
pthread_attr_t attr;
#endif
- rust_dom(rust_srv *srv, rust_crate const *root_crate);
+ // Only a pointer to 'name' is kept, so it must live as long as this
+ // domain.
+ rust_dom(rust_srv *srv, rust_crate const *root_crate, const char *name);
~rust_dom();
void activate(rust_task *task);