<!--
{
  "availability" : [
    "DriverKit: -",
    "iOS: -",
    "iPadOS: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "DriverKit",
  "identifier" : "/documentation/DriverKit/IOService/CreatePMAssertion",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "DriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOService@F@CreatePMAssertion#i#*k#b#"
  },
  "title" : "CreatePMAssertion"
}
-->

# CreatePMAssertion

```
virtual kern_return_t CreatePMAssertion(uint32_t assertionBits, uint64_t *assertionID, bool synced);
```

## Parameters

`assertionBits`

Bit masks including all the flavors that require to be asserted.

`assertionID`

pointer that will contain the unique identifier of the created
power assertion.

`synced`

indicates if the assertion must prevent an imminent sleep transition.
When set to true, and if a system sleep is irreversible, the call will return
kIOReturnBusy, in which case the assertion is not created. Only
kIOServicePMAssertionCPUBit is valid for assertionBits if sleepSafe is set to
true.

## Return Value

kIOReturnSuccess on success. See IOReturn.h for error codes.

## Discussion

\abstract Create a power management assertion.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)