---
name: "pthread_attr_setcreatesuspend_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_attr_setcreatesuspend_np"
---

# pthread\_attr\_setcreatesuspend\_np(3)

prepare attribute for creation of suspended thread

## NAME

**pthread\_attr\_setcreatesuspend\_np** – prepare attribute for creation of suspended thread

## LIBRARY

POSIX Threads Library (libpthread, -lpthread)

## SYNOPSIS

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

*int*\

**pthread\_attr\_setcreatesuspend\_np**(*pthread\_attr\_t \*attr*);

## DESCRIPTION

The **pthread\_attr\_setcreatesuspend\_np**() instructs [pthread\_create(3)](/pthread_create/3.md) that the thread created with the *attr* attribute should be created and left in a suspended state until explicitly resumed by the call to **pthread\_resume\_np**() or **pthread\_resume\_all\_np**().

## RETURN VALUES

The **pthread\_attr\_setcreatesuspend\_np()** function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate the error.

## ERRORS

The **pthread\_attr\_setcreatesuspend\_np**() function will fail if:

- \[EINVAL\]

  The value specified by *attr* is invalid.

## SEE ALSO

[pthread\_attr\_destroy(3)](/pthread_attr_destroy/3.md), [pthread\_attr\_init(3)](/pthread_attr_init/3.md), [pthread\_create(3)](/pthread_create/3.md), [pthread\_np(3)](/pthread_np/3.md), [pthread\_resume\_all\_np(3)](/pthread_resume_all_np/3.md), [pthread\_resume\_np(3)](/pthread_resume_np/3.md)

## AUTHORS

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