---
name: "FUTEX_FD"
section: "2const"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/FUTEX_FD"
---

# FUTEX\_FD(2const)

create a file descriptor associated with a futex

## NAME

FUTEX\_FD - create a file descriptor associated with a futex

## LIBRARY

Standard C library (*libc*, *-lc*)

## SYNOPSIS

```
#include <linux/futex.h>  /* Definition of FUTEX_* constants */
#include <sys/syscall.h>  /* Definition of SYS_* constants */
#include <unistd.h>
```

**\[\[deprecated\]\]** **long syscall(SYS\_futex, uint32\_t \****uaddr***, FUTEX\_FD, uint32\_t** *val***);**

## DESCRIPTION

This operation creates a file descriptor that is associated with the futex at *uaddr*. The caller must close the returned file descriptor after use.

When another process or thread performs a [**FUTEX\_WAKE**(2const)](/FUTEX_WAKE/2const.md) on the futex word, the file descriptor indicates as being readable with [**select**(2)](/select/2.md), [**poll**(2)](/poll/2.md), and [**epoll**(7)](/epoll/7.md)

The file descriptor can be used to obtain asynchronous notifications: if *val* is nonzero, then, when another process or thread executes a [**FUTEX\_WAKE**(2const)](/FUTEX_WAKE/2const.md), the caller will receive the signal number that was passed in *val*.

## RETURN VALUE

On error, -1 is returned, and *errno* is set to indicate the error.

On success, **FUTEX\_FD** Returns the new file descriptor associated with the futex.

## ERRORS

See [**futex**(2)](/futex/2.md).

- **EINVAL**

  The signal number supplied in *val* is invalid.

- **ENFILE**

  The system-wide limit on the total number of open files has been reached.

## STANDARDS

Linux.

## HISTORY

From Linux 2.6.0 up to and including Linux 2.6.25.

Because it was inherently racy, **FUTEX\_FD** has been removed from Linux 2.6.26 onward.

## SEE ALSO

[**futex**(2)](/futex/2.md)
