lib/cpu/msr.rb in cpu-0.0.0 vs lib/cpu/msr.rb in cpu-0.0.1
- old
+ new
@@ -10,9 +10,11 @@
def self.load_module
system "#{CPU.modprobe_path} msr"
sleep 1
end
+ # Create a new wrapper for the msr kernel file associated with
+ # +processor_id+.
def initialize(processor_id)
self.class.available? or self.class.load_module
begin
@io = IO.new IO.sysopen('/dev/cpu/%d/msr' % processor_id, 'rb')
rescue Errno::ENOENT