tail head cat sleep
QR code linking to this page

Manual Pages  — PTHREAD_SUSPEND_NP

NAME

pthread_suspend_np – suspend a thread

CONTENTS

LIBRARY

POSIX Threads Library (libpthread, -lpthread)

SYNOPSIS

#include <pthread_np.h>

int
pthread_suspend_np(pthread_t tid);

DESCRIPTION

The pthread_suspend_np() function, called on an active thread, causes it to suspend.

It is not safe for the caller of the pthread_suspend_np() function to use any non-async signal safe functions, except pthread_resume_np(3), until suspended thread is resumed, unless measures are taken to ensure that the thread is suspended at a safe point.

RETURN VALUES

If successful, pthread_suspend_np() function returns 0. Otherwise, an error number is returned to indicate the error.

ERRORS

The pthread_suspend_np() function will fail if:
[EDEADLK]
  An attempt was made to suspend the current thread.
[EINVAL]
  The value specified by the tid argument is invalid.
[ESRCH]
  No thread could be found corresponding to the thread ID specified by the tid argument.

SEE ALSO

pthread_np(3), pthread_resume_all_np(3), pthread_resume_np(3), pthread_suspend_all_np(3)

AUTHORS

This manual page was written by Alexey Zelkin <Mt phantom@FreeBSD.org>.

PTHREAD_SUSPEND_NP (3) October 12, 2021

tail head cat sleep
QR code linking to this page


Please direct any comments about this manual page service to Ben Bullock. Privacy policy.

“ Like a classics radio station whose play list spans decades, Unix simultaneously exhibits its mixed and dated heritage. There's Clash-era graphics interfaces; Beatles-era two-letter command names; and systems programs (for example, ps) whose terse and obscure output was designed for slow teletypes; Bing Crosby-era command editing (# and @ are still the default line editing commands), and Scott Joplin-era core dumps. ”
— The Unix Haters' handbook