Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pthread_multi_np(3) [freebsd man page]

PTHREAD_MULTI_NP(3)					   BSD Library Functions Manual 				       PTHREAD_MULTI_NP(3)

NAME
pthread_multi_np, pthread_single_np -- switch between multi- and single-threaded scheduling modes LIBRARY
POSIX Threads Library (libpthread, -lpthread) SYNOPSIS
#include <pthread_np.h> int pthread_multi_np(void); int pthread_single_np(void); DESCRIPTION
The pthread_single_np() function switches the process to a single-threaded mode, i.e., suspends all threads except the current. The seman- tics of this function is similar to pthread_suspend_all_np(3). The pthread_multi_np() function switches the process to a multi-threaded mode. The semantics of this function is similar to pthread_resume_all_np(3). RETURN VALUES
The pthread_multi_np() and pthread_single_np functions always return 0. SEE ALSO
pthread_resume_all_np(3), pthread_suspend_all_np(3) AUTHORS
This manual page was written by Alexey Zelkin <phantom@FreeBSD.org>. BSD
February 13, 2003 BSD

Check Out this Related Man Page

PTHREAD_SWITCH_ADD_NP(3)				   BSD Library Functions Manual 				  PTHREAD_SWITCH_ADD_NP(3)

NAME
pthread_switch_add_np, pthread_switch_delete_np -- thread context switches debugging primitives LIBRARY
POSIX Threads Library (libpthread, -lpthread) SYNOPSIS
#include <pthread_np.h> int pthread_switch_add_np(pthread_switch_routine_t routine); int pthread_switch_delete_np(pthread_switch_routine_t routine); DESCRIPTION
An application is allowed to monitor the thread context switches inside the threading library. An application can install a routine that gets called every time a thread (explicitly created by an application with the pthread_create(3) function) gets the context switched. The routine is passed the thread IDs of the threads that are being switched in and out. Installation and removal of these hooks may be done using the pthread_switch_add_np() and pthread_switch_delete_np() functions respectively. RETURN VALUES
If successful, these functions return 0. Otherwise, an error number is returned to indicate the error. ERRORS
The pthread_switch_add_np() may fail if: [EINVAL] NULL pointer was passed in the routine argument. The pthread_switch_delete_np() may fail if: [EINVAL] The routine argument is different from the argument previously passed to the pthread_switch_add_np() function. SEE ALSO
pthread_create(3) AUTHORS
This manual page was written by Alexey Zelkin <phantom@FreeBSD.org>. BSD
February 13, 2003 BSD
Man Page

2 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

script for multi-threaded bash processes

hey everyone, I'm having some trouble breaking down some code. It's simple a control script that takes machines meant to be backed up from a list. Then according to that will run multi-threaded processes up until the specified thread limit. for example if there are 4 machines to be backed up,... (2 Replies)
Discussion started by: terrell
2 Replies

2. UNIX for Advanced & Expert Users

Which process has created a file ?

Hi All, We have a multi-threaded application. During the course of action, each process creates some files. Is there any way to know which process has created a particular file ? Ex: Suppose we have 3 process running A, B and C in the application and some files FILE1 FILE2 FILE3 and... (4 Replies)
Discussion started by: 14341
4 Replies