@@ -45,39 +45,14 @@ class rust_crate_cache {
45
45
struct rust_task_thread : public kernel_owned <rust_task_thread>,
46
46
rust_thread
47
47
{
48
+ private:
48
49
49
50
// Fields known only by the runtime:
50
51
rust_log _log;
51
52
52
- // NB: this is used to filter *runtime-originating* debug
53
- // logging, on a per-scheduler basis. It's not likely what
54
- // you want to expose to the user in terms of per-task
55
- // or per-module logging control. By default all schedulers
56
- // are set to debug-level logging here, and filtered by
57
- // runtime category using the pseudo-modules ::rt::foo.
58
- uint32_t log_lvl;
59
-
60
- rust_srv *srv;
61
- const char *const name;
62
-
63
- rust_task_list newborn_tasks;
64
- rust_task_list running_tasks;
65
- rust_task_list blocked_tasks;
66
- rust_task_list dead_tasks;
67
-
68
53
rust_crate_cache cache;
69
-
70
- randctx rctx;
71
-
72
- rust_kernel *kernel;
73
- rust_scheduler *sched;
74
- int32_t list_index;
75
-
76
54
const int id;
77
55
78
- lock_and_signal lock;
79
- size_t min_stack_size;
80
-
81
56
#ifndef __WIN32__
82
57
pthread_attr_t attr;
83
58
static pthread_key_t task_key;
@@ -86,21 +61,43 @@ struct rust_task_thread : public kernel_owned<rust_task_thread>,
86
61
#endif
87
62
88
63
static bool tls_initialized;
89
-
90
- rust_env *env;
91
64
context c_context;
92
65
93
66
bool should_exit;
94
67
95
- private:
96
-
97
68
stk_seg *cached_c_stack;
98
69
stk_seg *extra_c_stack;
99
70
100
71
void prepare_c_stack (rust_task *task);
101
72
void unprepare_c_stack ();
102
73
103
74
public:
75
+ rust_kernel *kernel;
76
+ rust_scheduler *sched;
77
+ rust_srv *srv;
78
+
79
+ lock_and_signal lock;
80
+
81
+ rust_task_list newborn_tasks;
82
+ rust_task_list running_tasks;
83
+ rust_task_list blocked_tasks;
84
+ rust_task_list dead_tasks;
85
+
86
+ // NB: this is used to filter *runtime-originating* debug
87
+ // logging, on a per-scheduler basis. It's not likely what
88
+ // you want to expose to the user in terms of per-task
89
+ // or per-module logging control. By default all schedulers
90
+ // are set to debug-level logging here, and filtered by
91
+ // runtime category using the pseudo-modules ::rt::foo.
92
+ uint32_t log_lvl;
93
+
94
+ size_t min_stack_size;
95
+ rust_env *env;
96
+
97
+ randctx rctx;
98
+
99
+ int32_t list_index;
100
+ const char *const name;
104
101
105
102
// Only a pointer to 'name' is kept, so it must live as long as this
106
103
// domain.
0 commit comments