Class: Mach::Host

Inherits:
Port
  • Object
show all
Includes:
Functions
Defined in:
lib/mach/host.rb

Instance Attribute Summary

Attributes inherited from Port

#ipc_space, #port

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Functions

attach_mach_function, error_check, error_check_bootstrap, new_memory_pointer, #new_memory_pointer

Methods included from Types

#enum, #find_type, typedefs

Methods inherited from Port

#==, #copy_send, #deallocate, #destroy, #insert_right, #receive_right, #send_right, #to_s

Constructor Details

#initialize(host) ⇒ Host



14
15
16
# File 'lib/mach/host.rb', line 14

def initialize(host)
  super(:port => host)
end

Class Method Details

.selfTask



10
11
12
# File 'lib/mach/host.rb', line 10

def self.self
  new(Functions.mach_host_self)
end

Instance Method Details

#get_clock_serviceObject



20
21
22
23
24
25
# File 'lib/mach/host.rb', line 20

def get_clock_service
  mem = new_memory_pointer(:clock_id_t)
  host_get_clock_service(host, 0, mem)
  clock_id = Port.new(:port => mem.read_int)
  Clock.new clock_id
end