Skip to content

Commit b841796

Browse files
Add layout_info field to TaskVTable so that debuggers can decode raw tasks (#29)
1 parent 8a6ffad commit b841796

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/raw.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ pub(crate) struct TaskVTable {
3434

3535
/// Creates a new waker associated with the task.
3636
pub(crate) clone_waker: unsafe fn(ptr: *const ()) -> RawWaker,
37+
38+
/// The memory layout of the task. This information enables
39+
/// debuggers to decode raw task memory blobs. Do not remove
40+
/// the field, even if it appears to be unused.
41+
#[allow(unused)]
42+
pub(crate) layout_info: &'static Option<TaskLayout>,
3743
}
3844

3945
/// Memory layout of a task.
@@ -155,6 +161,7 @@ where
155161
destroy: Self::destroy,
156162
run: Self::run,
157163
clone_waker: Self::clone_waker,
164+
layout_info: &Self::TASK_LAYOUT,
158165
},
159166
});
160167

0 commit comments

Comments
 (0)