---
title: commandGate
framework: kernel
role: pseudoSymbol
path: kernel/iocommandgate/1811293-commandgate
---

# commandGate

Factory method to create and initialise an IOCommandGate, See $link init.

## Declaration

```occ
static IOCommandGate *commandGate(
 OSObject *owner,
 Action action = 0); 
```

## Return Value

Return Value Returns a pointer to the new command gate if sucessful, 0 otherwise.

## See Also

### Miscellaneous

- [attemptAction](kernel/iocommandgate/1811105-attemptaction.md)
- [attemptCommand](kernel/iocommandgate/1811141-attemptcommand.md)
- [commandSleep(void *, AbsoluteTime, UInt32)](kernel/iocommandgate/1811482-commandsleep.md)
- [commandSleep(void *, UInt32)](kernel/iocommandgate/1811498-commandsleep.md)
- [commandWakeup](kernel/iocommandgate/1811517-commandwakeup.md)
- [disable](kernel/iocommandgate/1811531-disable.md)
- [enable](kernel/iocommandgate/1811547-enable.md)
- [init](kernel/iocommandgate/1811560-init.md)
- [runAction](kernel/iocommandgate/1811576-runaction.md)
- [runCommand](kernel/iocommandgate/1811585-runcommand.md)
