---
title: gatedGetCommand
framework: kernel
role: pseudoSymbol
path: kernel/iocommandpool/1811028-gatedgetcommand
---

# gatedGetCommand

## Declaration

```occ
virtual IOReturn gatedGetCommand(
 IOCommand **vCommand,
 boolvBlock); 
```

## Parameters

- `vCommand`: A pointer to a pointer to an IOCommand object where the returned command will be stored.
- `vBlock`: A bool that indicates whether to block the request until a command becomes available.

## Return Value

Return Value Returns kIOReturnNoResources if no command is available and the client doesn't wish to block until one does become available. kIOReturnSuccess if the vCommand argument is valid.

## Overview

Overview The gatedGetCommand method is used to serialize the extraction of a command from the pool behind a command gate, runAction-ed by getCommand.

## See Also

### Miscellaneous

- [commandPool](kernel/iocommandpool/1811017-commandpool.md)
- [gatedReturnCommand](kernel/iocommandpool/1811045-gatedreturncommand.md)
- [getCommand](kernel/iocommandpool/1811062-getcommand.md)
- [init](kernel/iocommandpool/1811075-init.md)
- [initWithWorkLoop](kernel/iocommandpool/1811086-initwithworkloop.md)
- [returnCommand](kernel/iocommandpool/1811102-returncommand.md)
- [withWorkLoop(IOService *, IOWorkLoop *, UInt32)](kernel/iocommandpool/1811120-withworkloop.md)
- [withWorkLoop(IOWorkLoop *)](kernel/iocommandpool/1811136-withworkloop.md)
