| 1617 | "Interrupt Names"); |
| 1618 | |
| 1619 | static int |
| 1620 | sysctl_intrcnt(SYSCTL_HANDLER_ARGS) |
| 1621 | { |
| 1622 | #ifdef SCTL_MASK32 |
| 1623 | uint32_t *intrcnt32; |
| 1624 | unsigned i; |
| 1625 | int error; |
| 1626 | |
| 1627 | if (req->flags & SCTL_MASK32) { |
| 1628 | if (!req->oldptr) |
| 1629 | return (sysctl_handle_opaque(oidp, NULL, sintrcnt / 2, req)); |
| 1630 | intrcnt32 = malloc(sintrcnt / 2, M_TEMP, M_NOWAIT); |
| 1631 | if (intrcnt32 == NULL) |
| 1632 | return (ENOMEM); |
| 1633 | for (i = 0; i < sintrcnt / sizeof (u_long); i++) |
| 1634 | intrcnt32[i] = intrcnt[i]; |
| 1635 | error = sysctl_handle_opaque(oidp, intrcnt32, sintrcnt / 2, req); |
| 1636 | free(intrcnt32, M_TEMP); |
| 1637 | return (error); |
| 1638 | } |
| 1639 | #endif |
| 1640 | return (sysctl_handle_opaque(oidp, intrcnt, sintrcnt, req)); |
| 1641 | } |
| 1642 | |
| 1643 | SYSCTL_PROC(_hw, OID_AUTO, intrcnt, |
| 1644 | CTLTYPE_OPAQUE | CTLFLAG_RD | CTLFLAG_NEEDGIANT, NULL, 0, |
nothing calls this directly
no test coverage detected