---
name: "request_RTirq"
section: "2"
platform: "linux"
package: "rtlinux-doc"
version: "1.0-2"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/request_RTirq"
---

# request\_RTirq(2)

install an interrupt handler

## NAME

request\_RTirq - install an interrupt handler

## SYNOPSIS

```
#define MODULE
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/version.h>
#include <linux/errno.h>
#include <linux/rtf.h>
#include <asm/rt_irq.h>
```

**int request\_RTirq(unsigned int** *irq***, void (\****handler***)(void));**

## DESCRIPTION

**request\_RTirq** installs *handler* as an interrupt service routine for IRQ level *irq*. *handler* is then invoked whenever interrupt number *irq* occurs.  The interrupt service routine can be uninstalled using **free\_RTirq**.

## RETURN VALUE

On success, 0 is returned.  On failure, a negative value is returned as described below.

## ERRORS

- **-EINVAL**

  *irq* is not a valid IRQ number, or *handler* is NULL.

- **-EBUSY**

  *irq* already has a handler.  You must first call **free\_RTirq** to make the IRQ available.

## SEE ALSO

[**free\_RTirq**(2)](/free_RTirq/2.md)

## AUTHOR

This manual page was written by Jerry Epplin.

Copyright (C) 1997 Jerry Epplin, placed under the GNU General Public License, see the file copyright for details.
