void Connector::Publish() { IOAssert(!_published, "Connector must not be published already"); ipc_allocate_port(&_port); _thread = Thread::Alloc()->InitWithEntry(IOMemberFunctionCast(Thread::Entry, this, &Connector::ThreadEntry), this); _thread->Start(); _published = true; }
bool IOInterruptEventSource::registerForInterrupt() { IOReturn result; kern_interrupt_handler_t callback = IOMemberFunctionCast(kern_interrupt_handler_t, this, &IOInterruptEventSource::handleInterrupt); if(_interrupt == 0) { result = kern_requestExclusiveInterrupt(_owner, this, &_interrupt, callback); } else { result = kern_registerForInterrupt(_interrupt, _exclusive, this, this, callback); } return (result == kIOReturnSuccess); }