Exemplo n.º 1
0
IOCommandGate *
IOCommandGate::commandGate(OSObject *inOwner, Action inAction)
{
    IOCommandGate *me = new IOCommandGate;

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

    return me;
}
Exemplo n.º 2
0
IOReturn AppleUSBCDC::setProperties( OSObject * properties )
{
	IOReturn result = kIOReturnError;
	IOCommandGate *cg;
	
	XTRACE(this, 0, 0, "setProperties");
	
	cg = getCommandGate();
	
	if ( cg != NULL )
	{
        //<radar://problem/7488030> retain the CommandGate in case device gets pulled when we are setting the properties..
        cg->retain();
		result = cg->runAction( setPropertiesAction, (void *)properties );
        cg->release();
	}
	
	XTRACE(this, 0, 0, "setProperties - Exit");
	
	return result;
}