<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "os",
  "identifier" : "/documentation/os/os_unfair_lock",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "os"
    ],
    "preciseIdentifier" : "c:@T@os_unfair_lock"
  },
  "title" : "os_unfair_lock"
}
-->

# os_unfair_lock

A structure that contains the data for an unfair lock.

```
typedef struct os_unfair_lock_s os_unfair_lock;
```

## Discussion

To create a lock, allocate a variable of this type and initialize it to [`OS_UNFAIR_LOCK_INIT`](/documentation/os/OS_UNFAIR_LOCK_INIT).

---

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)