Class: Ragweed::Wraposx::ThreadInfo::SchedTimeshare
- Includes:
- ThreadInfoMixins
- Defined in:
- lib/ragweed/wraposx/thread_info.rb
Overview
struct policy_timeshare_info
int max_priority;
int base_priority;
int cur_priority;
boolean_t depressed;
int depress_priority;
;
Instance Method Summary collapse
Methods included from ThreadInfoMixins
#get, get, #initialize, #inspect, #refresh, #to_s
Instance Method Details
#dump(&block) ⇒ Object
161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/ragweed/wraposx/thread_info.rb', line 161 def dump(&block) maybe_hex = lambda {|a| begin; "\n" + (" " * 9) + block.call(a, 16).hexdump(true)[10..-2]; rescue; ""; end } string =" -----------------------------------------------------------------------\n Timeshare Info:\n max_priority: \#{self.max_priority.to_s.rjust(8, \"0\")} \#{maybe_hex.call(self.max_priority)}\n base_priority: \#{self.base_priority.to_s.rjust(8, \"0\")} \#{maybe_hex.call(self.base_priority)}\n cur_priority: \#{self.cpu_usage.to_s.rjust(8, \"0\")} \#{maybe_hex.call(self.cur_priority)}\n depressed: \#{(!self.depressed.zero?).to_s.rjust(8, \" \")} \#{maybe_hex.call(self.depressed)}\n depress_priority: \#{self.depress_priority.to_s.rjust(8, \"0\")} \#{maybe_hex.call(self.depressed_priority)}\n" end |