---
name: "rtl_free_soft_irq"
section: "3"
platform: "linux"
package: "rtlinux"
version: "2.0rel-1"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/rtl_get_soft_irq"
---

# rtl\_free\_soft\_irq(3)

install and remove software interrupt handlers

Part of [rtl\_get\_soft\_irq(3)](/rtl_get_soft_irq/3.md).

## NAME

rtl\_get\_soft\_irq, rtl\_free\_soft\_irq - install and remove software interrupt handlers

## SYNOPSIS

**#include \<rtl\_core.h\>**

**int rtl\_get\_soft\_irq (void (\*handler)(int, void \*, struct pt\_regs \*), const char \* devname);**

**void rtl\_free\_soft\_irq(unsigned int irq);**

## DESCRIPTION

These functions are specific to Real-Time Linux.

**rtl\_get\_soft\_irq** allocates a software interrupt vector and registers the function *handler* as the interrupt handler for the allocated software interrupt. The **devname** string is shown in **/proc/interrupts** for every soft interrupt handler installed. The software interrupt can later be triggered by the **[rtl\_global\_pend\_irq(3)](/rtl_global_pend_irq/3.md)** function.

**rtl\_free\_soft\_irq uninstalls the specified software interrupt handler.**

The software interrupt handler will be executed in the Linux kernel context so it can call any functions that are normally allowed to be called from Linux interrupt handlers.

## RETURN VALUE

**rtl\_get\_soft\_irq** returns the allocated vector number on success and a negative error code on error.

## ERRORS

- **-EBUSY**

  rtl\_get\_soft\_irq: could not allocate a software interrupt vector.

## NOTES

These functions can only be called in the Linux kernel mode.

## AUTHOR

Michael Barabanov \<baraban@fsmlabs.com\>

## SEE ALSO

[**rtl\_global\_pend\_irq**(3)](/rtl_global_pend_irq/3.md),
