---
title: _maintRequest
framework: kernel
role: pseudoSymbol
path: kernel/ioworkloop/1809377-_maintrequest
---

# _maintRequest

Synchronous implementation of addEventSource and removeEventSource functions.

## Declaration

```occ
virtual IOReturn _maintRequest(
 void *command,
 void *data,
 void *,
 void *); 
```

## Return Value

Return Value kIOReturnUnsupported if the command given is not implemented, kIOReturnSuccess otherwise.

## Overview

Overview This function implements the commands as defined in the maintCommandEnum. It can be subclassed but it isn't an external API in the usual sense. A subclass implementation of _maintRequest would be called synchronously with respect to the work loop and it should be implemented in the usual way that an ioctl would be.

## See Also

### Miscellaneous

- [addEventSource](kernel/ioworkloop/1809383-addeventsource.md)
- [disableAllEventSources](kernel/ioworkloop/1809388-disablealleventsources.md)
- [disableAllInterrupts](kernel/ioworkloop/1809396-disableallinterrupts.md)
- [enableAllEventSources](kernel/ioworkloop/1809401-enablealleventsources.md)
- [enableAllInterrupts](kernel/ioworkloop/1809404-enableallinterrupts.md)
- [eventSourcePerformsWork](kernel/ioworkloop/1809410-eventsourceperformswork.md)
- [free](kernel/ioworkloop/1809418-free.md)
- [getThread](kernel/ioworkloop/1809425-getthread.md)
- [inGate](kernel/ioworkloop/1809434-ingate.md)
- [init](kernel/ioworkloop/1809441-init.md)
- [onThread](kernel/ioworkloop/1809446-onthread.md)
- [removeEventSource](kernel/ioworkloop/1809449-removeeventsource.md)
- [runAction](kernel/ioworkloop/1809454-runaction.md)
- [runEventSources](kernel/ioworkloop/1809459-runeventsources.md)
- [threadMain](kernel/ioworkloop/1809465-threadmain.md)
- [threadMainContinuation](kernel/ioworkloop/1809470-threadmaincontinuation.md)
- [workLoop](kernel/ioworkloop/1809476-workloop.md)
- [workLoopWithOptions](kernel/ioworkloop/1809483-workloopwithoptions.md)
- [workLoopWithOptions(IOOptionBits options)](kernel/ioworkloop/1809488-workloopwithoptions.md)
