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

# hv_vcpu_interrupt(_:_:)

Forces the vCPU instances you provide to immediately exit the VM.

## Declaration

```swift
func hv_vcpu_interrupt(_ vcpus: UnsafeMutablePointer<hv_vcpuid_t>, _ vcpu_count: UInt32) -> hv_return_t
```

## Parameters

- `vcpus`: A pointer to an array of instances of vCPU.
- `vcpu_count`: The number of vCPU IDs specified by vcpus.

## Return Value

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

## See Also

### Runtime

- [hv_vcpu_run_until(_:_:)](hypervisor/hv_vcpu_run_until(_:_:).md)
- [hv_vcpu_flush(_:)](hypervisor/hv_vcpu_flush(_:).md)
- [hv_vcpu_get_exec_time(_:_:)](hypervisor/hv_vcpu_get_exec_time(_:_:).md)
- [hv_vcpu_run(_:)](hypervisor/hv_vcpu_run(_:).md)
- [Execution Deadlines](hypervisor/3553338-execution-deadlines.md)
