---
title: "CFMachPortGetPort(_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfmachportgetport(_:)"
---

# CFMachPortGetPort(_:)

Returns the native Mach port represented by a CFMachPort object.

## Declaration

```swift
func CFMachPortGetPort(_ port: CFMachPort!) -> mach_port_t
```

## Parameters

- `port`: The CFMachPort object to examine.

## Return Value

Return Value The native Mach port represented by port.

## See Also

### Examining a CFMachPort Object

- [CFMachPortGetContext(_:_:)](corefoundation/cfmachportgetcontext(_:_:).md)
- [CFMachPortGetInvalidationCallBack(_:)](corefoundation/cfmachportgetinvalidationcallback(_:).md)
- [CFMachPortIsValid(_:)](corefoundation/cfmachportisvalid(_:).md)
