---
title: runAction
framework: kernel
role: pseudoSymbol
path: kernel/ioworkloop/1809454-runaction
---

# runAction

Single thread a call to an action with the work-loop.

## Declaration

```occ
virtual IOReturn runAction(
 Action action,
 OSObject *target, 
 void *arg0 = 0,
 void *arg1 = 0, 
 void *arg2 = 0,
 void *arg3 = 0); 
```

## Parameters

- `action`: Pointer to function to be executed in work-loop context.
- `arg0`: Parameter for action parameter, defaults to 0.
- `arg1`: Parameter for action parameter, defaults to 0.
- `arg2`: Parameter for action parameter, defaults to 0.
- `arg3`: Parameter for action parameter, defaults to 0.

## Return Value

Return Value Returns the value of the Action callout.

## Overview

Overview Client function that causes the given action to be called in a single threaded manner. Beware: the work-loop's gate is recursive and runAction can cause direct or indirect re-entrancy. When executing on a client's thread, runAction will sleep until the work-loop's gate opens for execution of client actions, the action is single threaded against all other work-loop event sources.

## See Also

### Miscellaneous

- [_maintRequest](kernel/ioworkloop/1809377-_maintrequest.md)
- [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)
- [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)
