---
name: "kfifo_to_user"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/kfifo_to_user"
---

# kfifo\_to\_user(9)

copies data from the fifo into user space

## NAME

kfifo\_to\_user - copies data from the fifo into user space

## SYNOPSIS

**kfifo\_to\_user(***fifo***,** *to***,** *len***,** *copied***);**

## ARGUMENTS

*fifo*

address of the fifo to be used

*to*

where the data must be copied

*len*

the size of the destination buffer

*copied*

pointer to output variable to store the number of copied bytes

## DESCRIPTION

This macro copies at most *len* bytes from the fifo into the *to* buffer and returns -EFAULT/0.

Note that with only one concurrent reader and one concurrent writer, you don't need extra locking to use these macro.

## COPYRIGHT
