---
title: "hv_vcpu_get_pending_interrupt(_:_:_:)"
framework: hypervisor
role: symbol
role_heading: Function
path: "hypervisor/hv_vcpu_get_pending_interrupt(_:_:_:)"
---

# hv_vcpu_get_pending_interrupt(_:_:_:)

Gets pending interrupts for a vCPU.

## Declaration

```swift
func hv_vcpu_get_pending_interrupt(_ vcpu: hv_vcpu_t, _ type: hv_interrupt_type_t, _ pending: UnsafeMutablePointer<Bool>) -> hv_return_t
```

## Parameters

- `vcpu`: The instance of the vCPU.
- `type`: The interrupt from Interrupt Constants.
- `pending`: A variable that indicates whether, on output, the interrupt of type is pending or not.

## Return Value

Return Value HV_SUCCESS if the operation was successful, otherwise an error code specified in hv_return_t.

## Discussion

Discussion important: This function must be called by the owning thread.

## See Also

### Runtime

- [hv_vcpu_run(_:)](hypervisor/hv_vcpu_run(_:).md)
- [hv_vcpus_exit(_:_:)](hypervisor/hv_vcpus_exit(_:_:).md)
- [hv_vcpu_set_pending_interrupt(_:_:_:)](hypervisor/hv_vcpu_set_pending_interrupt(_:_:_:).md)
- [hv_vcpu_get_exec_time(_:_:)](hypervisor/hv_vcpu_get_exec_time(_:_:).md)
- [hv_interrupt_type_t](hypervisor/hv_interrupt_type_t.md)
- [Exits](hypervisor/exits.md)
