From b71340552fa0caa870877f87a1273e8d4c91efe6 Mon Sep 17 00:00:00 2001 From: Jeffrey Yasskin Date: Sun, 8 Aug 2010 19:24:35 -0700 Subject: 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. --- src/rt/rust_dom.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/rt/rust_dom.h') 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 running_tasks; ptr_vec blocked_tasks; ptr_vec 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); -- cgit v1.2.3