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

# rtf\_create(3)

create a real-time fifo

## NAME

rtf\_create - create a real-time fifo

## SYNOPSIS

```
#include <rtl_fifo.h>
```

**int rtf\_create(unsigned int** *fifo***, int** *size***);**

## DESCRIPTION

**rtf\_create** creates a real-time fifo (RT-FIFO) of size *size* and assigns it the identifier *fifo*. *fifo* is a value unique within the system, and must be less than RTF\_NO.

The RT-FIFO is a mechanism, implemented as a character device, to communicate between real-time tasks and ordinary Linux processes.  The rtf\_\* functions are used by the real-time tasks; Linux processes use standard character device access functions such as **[read(3)](/read/3.md)**, **[write(3)](/write/3.md)**, and **select(3)**.

## RETURN VALUE

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

## ERRORS

- **-ENODEV**

  *fifo* is greater than or equal to RTF\_NO.

- **-EBUSY**

  *fifo* is already in use.  Choose a different ID.

- **-ENOMEM**

  *size* bytes could not be allocated for the RT-FIFO.

## NOTES

This function can only be called in the Linux kernel mode.

## SEE ALSO

[**rtf\_create\_handler**(3)](/rtf_create_handler/3.md), [**rtf\_destroy**(3)](/rtf_destroy/3.md), [**rtf\_get**(3)](/rtf_get/3.md), [**rtf\_put**(3)](/rtf_put/3.md)
