File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,28 @@ pub struct ThreadInfo {
130130 pub pth_name : [ c_char ; MAXTHREADNAMESIZE ] // thread name, if any
131131}
132132
133+ impl PIDInfo for ThreadInfo {
134+ fn flavor ( ) -> PidInfoFlavor { PidInfoFlavor :: ThreadInfo }
135+ }
136+
137+ impl Default for ThreadInfo {
138+ fn default ( ) -> ThreadInfo {
139+ ThreadInfo {
140+ pth_user_time : 0 ,
141+ pth_system_time : 0 ,
142+ pth_cpu_usage : 0 ,
143+ pth_policy : 0 ,
144+ pth_run_state : 0 ,
145+ pth_flags : 0 ,
146+ pth_sleep_time : 0 ,
147+ pth_curpri : 0 ,
148+ pth_priority : 0 ,
149+ pth_maxpriority : 0 ,
150+ pth_name : [ 0 ; MAXTHREADNAMESIZE ] ,
151+ }
152+ }
153+ }
154+
133155#[ derive( Default ) ]
134156pub struct WorkQueueInfo {
135157 pub pwq_nthreads : uint32_t , // total number of workqueue threads
You can’t perform that action at this time.
0 commit comments