<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFMachPortIsValid(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@F@CFMachPortIsValid"
  },
  "title" : "CFMachPortIsValid(_:)"
}
-->

# CFMachPortIsValid(_:)

Returns a Boolean value that indicates whether a CFMachPort object is valid and able to receive messages.

```
func CFMachPortIsValid(_ port: CFMachPort!) -> Bool
```

## Parameters

`port`

The CFMachPort object to examine.

## Return Value

`true` if `port` can be used for communication, otherwise `false`.

## Discussion

---

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)