PTHREAD_ATTR_SETCREATESUSPEND_NP(3)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

πŸ’… 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 by attr is invalid. 🚨

🌈 SEE ALSO 🌈

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