---
name: "pthread_multi_np"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/pthread_multi_np"
---

# pthread\_multi\_np(3)

switch between multi- and single-threaded scheduling modes

## NAME

**pthread\_multi\_np**, **pthread\_single\_np** – switch between multi- and single-threaded scheduling modes

## LIBRARY

POSIX Threads Library (libpthread, -lpthread)

## SYNOPSIS

**#include \<pthread\_np.h\>**

*int*\

**pthread\_multi\_np**(*void*);

*int*\

**pthread\_single\_np**(*void*);

## DESCRIPTION

The **pthread\_single\_np**() function switches the process to a single-threaded mode, i.e., suspends all threads except the current. The semantics of this function is similar to [pthread\_suspend\_all\_np(3)](/pthread_suspend_all_np/3.md).

The **pthread\_multi\_np**() function switches the process to a multi-threaded mode. The semantics of this function is similar to [pthread\_resume\_all\_np(3)](/pthread_resume_all_np/3.md).

## RETURN VALUES

The **pthread\_multi\_np**() and **pthread\_single\_np** functions always return 0.

## SEE ALSO

[pthread\_np(3)](/pthread_np/3.md), [pthread\_resume\_all\_np(3)](/pthread_resume_all_np/3.md), [pthread\_suspend\_all\_np(3)](/pthread_suspend_all_np/3.md)

## AUTHORS

This manual page was written by Alexey Zelkin ⟨*phantom@FreeBSD.org*⟩.
