コード例 #1
0
ファイル: IOWorkLoop.cpp プロジェクト: SbIm/xnu-env
IOWorkLoop *
IOWorkLoop::workLoopWithOptions(IOOptionBits options)
{
    IOWorkLoop *me = new IOWorkLoop;

    if (me && options) {
	me->reserved = IONew(ExpansionData, 1);
	if (!me->reserved) {
	    me->release();
	    return 0;
	}
	me->reserved->options = options;
    }

    if (me && !me->init()) {
        me->release();
        return 0;
    }

    return me;
}
コード例 #2
0
void IOFireWireSBP2LUN::free( void )
{
	FWKLOG( ( "IOFireWireSBP2LUN<%p> : free\n", this ) );

	//
	// free unreleased orbs
	//
	
//	flushAllManagementORBs();
		
	if( fORBSetIterator )			
		fORBSetIterator->release();

	if( fORBSet )
		fORBSet->release();

    //
    // release login set
    //
    
	if( fLoginSetIterator )			
		fLoginSetIterator->release();

	if( fLoginSet )
		fLoginSet->release();

	//
	// destroy command gate
	//
	
	if( fGate != NULL )
	{
		IOWorkLoop * workLoop = NULL;

		workLoop = fGate->getWorkLoop();
		workLoop->removeEventSource( fGate );
		workLoop->release();

		fGate->release();
		fGate = NULL;
	}
	
	if( fProviderTarget )
	{
		fProviderTarget->release();
		fProviderTarget = NULL;
	}
			
	IOService::free();
}