PTHREAD_ATTR_SETCREATESUSPEND_NP(3)
π PTHREAD_ATTR_SETCREATESUSPEND_NP(3) β Library Functions Manual π
okay bestie, welcome to the Library Functions Manual page for PTHREAD_ATTR_SETCREATESUSPEND_NP(3) β itβs giving very specific pthread energy, and weβre gonna get into it. π¦
β¨ NAME β¨
pthread_attr_setcreatesuspend_np β prepare attribute for creation of suspended thread
πΈ LIBRARY πΈ
POSIX Threads Library (libpthread, -lpthread) β yes, thatβs the one, bestie. π«Ά
π SYNOPSIS π
#include <pthread_np.h>
int
pthread_attr_setcreatesuspend_np(pthread_attr_t *attr);
literally copy it exactly like that, no cap. π
π DESCRIPTION π
okay so pthread_attr_setcreatesuspend_np() instructs pthread_create(3) that the thread created with the attr attribute should be created and left in a suspended state until itβs explicitly resumed by the call to pthread_resume_np() or pthread_resume_all_np(). π§
thatβs the whole vibe: it sets up the attribute so the new thread starts suspended, and it stays suspended until somebody explicitly resumes it. iconic. π
β RETURN VALUES β
pthread_attr_setcreatesuspend_np() returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate the error. periodt. π
π₯ ERRORS π₯
pthread_attr_setcreatesuspend_np() will fail if:
[EINVAL]β The value specified byattris invalid. π¨
π SEE ALSO π
pthread_attr_destroy(3)pthread_attr_init(3)pthread_create(3)pthread_np(3)pthread_resume_all_np(3)pthread_resume_np(3)
go read those too, iykyk. πβ¨
π AUTHORS π
This manual page was written by Alexey Zelkin <phantom@FreeBSD.org>. real icon behavior, fr fr. π«Ά
mwah π thatβs the whole page, bestie β source/version: Debian, date: October 12, page: PTHREAD_ATTR_SETCREATESUSPEND_NP(3). slay. πΈπ
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 2003 Alexey Zelkin <phantom@FreeBSD.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms