PTHREAD_ATTR_SETCREATESUSPEND_NP(3) Library Functions Manual PTHREAD_ATTR_SETCREATESUSPEND_NP(3)

pthread_attr_setcreatesuspend_np
set attribute to create a thread suspended

POSIX Threads Library (libpthread, -lpthread)

#include <pthread.h>

int
pthread_attr_setcreatesuspend_np(pthread_attr_t attr);

The pthread_attr_setcreatesuspend_np() function sets the attr argument, so that if this attr is used in a pthread_create(3) call, then the thread created will not run, but it will remain blocked in the suspended queue, until pthread_resume_np(3) is called on it.

The pthread_attr_setcreatesuspend_np() function always returns 0.

The function is a non-standard extension.

No errors are defined.

pthread_create(3), pthread_resume_np(3), pthread_suspend_np(3)
July 9, 2010 NetBSD 9.0