> For the complete documentation index, see [llms.txt](https://book.bsdcn.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.bsdcn.org/man/man9/bus_describe_intr.9.md).

# BUS\_DESCRIBE\_INTR.9

`BUS_DESCRIBE_INTR` — 为活动中断处理程序关联描述

## 名称

`BUS_DESCRIBE_INTR`, `bus_describe_intr`

## 概要

```c
#include <sys/param.h>
#include <sys/bus.h>
```

```c
int
BUS_DESCRIBE_INTR(device_t dev, device_t child, struct resource *irq,
    void *cookie, const char *descr)

int
bus_describe_intr(device_t dev, struct resource *irq, void *cookie,
    const char *fmt, ...)
```

## 描述

`BUS_DESCRIBE_INTR` 方法为活动中断处理程序关联一段描述。`cookie` 参数必须是针对中断 `irq` 成功调用 [BUS\_SETUP\_INTR(9)](/man/man9/bus_setup_intr.9.md) 所返回的值。

`bus_describe_intr` 函数是 `BUS_DESCRIBE_INTR` 的简单封装。作为便利，`bus_describe_intr` 允许调用者使用 [printf(9)](/man/man9/printf.9.md) 风格的格式化，通过 `fmt` 构建描述字符串。

当通过 [BUS\_SETUP\_INTR(9)](/man/man9/bus_setup_intr.9.md) 建立中断处理程序时，该处理程序以建立处理程序所针对的设备命名。此名称随后用于多处，例如 [systat(1)](/man/man1/systat.1.md) 和 [vmstat(8)](/man/man8/vmstat.8.md) 显示的中断统计信息。对于使用单个中断的设备，设备名已足够唯一地标识中断处理程序。然而，对于使用多个中断的设备，区分各中断处理程序会很有用。为活动中断处理程序设置描述时，会在设备名后追加冒号和描述，构成中断处理程序名。

## 返回值

成功时返回零，否则返回一个适当的错误。

## 参见

[systat(1)](/man/man1/systat.1.md), [vmstat(8)](/man/man8/vmstat.8.md), [BUS\_SETUP\_INTR(9)](/man/man9/bus_setup_intr.9.md), [device(9)](/man/man9/device.9.md), [printf(9)](/man/man9/printf.9.md)

## 历史

`BUS_DESCRIBE_INTR` 方法和 `bus_describe_intr` 函数首次出现于 FreeBSD 8.1。

## 缺陷

目前无法从活动中断处理程序中移除描述。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://book.bsdcn.org/man/man9/bus_describe_intr.9.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
