From 6c914e928cc02f6d70568de153b7890711490bd3 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Sat, 1 Aug 1998 15:31:49 +0000 Subject: Added automatic generation of files. --- doc/new_chapters/Makefile | 43 +- doc/new_chapters/clock.t | 264 ++++++++++++ doc/new_chapters/cond.t | 386 +++++++++++++++++ doc/new_chapters/key.t | 179 ++++++++ doc/new_chapters/mutex.t | 642 +++++++++++++++++++++++++++ doc/new_chapters/preface.t | 21 + doc/new_chapters/sched.t | 228 ++++++++++ doc/new_chapters/signal.t | 691 +++++++++++++++++++++++++++++ doc/new_chapters/thread.t | 1025 ++++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 3478 insertions(+), 1 deletion(-) create mode 100644 doc/new_chapters/clock.t create mode 100644 doc/new_chapters/cond.t create mode 100644 doc/new_chapters/key.t create mode 100644 doc/new_chapters/mutex.t create mode 100644 doc/new_chapters/preface.t create mode 100644 doc/new_chapters/sched.t create mode 100644 doc/new_chapters/signal.t create mode 100644 doc/new_chapters/thread.t (limited to 'doc') diff --git a/doc/new_chapters/Makefile b/doc/new_chapters/Makefile index de2fdfde4e..846eb90824 100644 --- a/doc/new_chapters/Makefile +++ b/doc/new_chapters/Makefile @@ -18,6 +18,8 @@ dirs: COMMON_FILES=../common/cpright.texi +GENERATED_FILES=clock.texi + FILES= clock.texi cond.texi key.texi mutex.texi $(PROJECT).texi preface.texi \ sched.texi signal.texi thread.texi $(COMMON_FILES) @@ -50,5 +52,44 @@ html: dirs clean: rm -f *.o $(PROG) *.txt core *.html rm -f *.dvi *.ps *.log *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr $(BASE) - rm -f $(PROJECT) $(PROJECT)-* _* + rm -f $(PROJECT) $(PROJECT)-* _* $(GENERATED_FILES) + +preface.texi: preface.t Makefile + $(BMENU) -p "" \ + -u "Top" \ + -n "" ${*}.t + +thread.texi: thread.t Makefile + $(BMENU) -p "" \ + -u "Top" \ + -n "" ${*}.t +signal.texi: signal.t Makefile + $(BMENU) -p "" \ + -u "Top" \ + -n "" ${*}.t + +mutex.texi: mutex.t Makefile + $(BMENU) -p "" \ + -u "Top" \ + -n "" ${*}.t + +cond.texi: cond.t Makefile + $(BMENU) -p "" \ + -u "Top" \ + -n "" ${*}.t + +key.texi: key.t Makefile + $(BMENU) -p "" \ + -u "Top" \ + -n "" ${*}.t + +clock.texi: clock.t Makefile + $(BMENU) -p "" \ + -u "Top" \ + -n "" ${*}.t + +sched.texi: sched.t Makefile + $(BMENU) -p "" \ + -u "Top" \ + -n "" ${*}.t diff --git a/doc/new_chapters/clock.t b/doc/new_chapters/clock.t new file mode 100644 index 0000000000..d2f7e1e492 --- /dev/null +++ b/doc/new_chapters/clock.t @@ -0,0 +1,264 @@ +@c +@c COPYRIGHT (c) 1988-1998. +@c On-Line Applications Research Corporation (OAR). +@c All rights reserved. +@c +@c $Id$ +@c + +@ifinfo +@node Clock Manager, Clock Manager Introduction, pthread_getspecific, Top +@end ifinfo +@chapter Clock Manager +@ifinfo +@menu +* Clock Manager Introduction:: +* Clock Manager Background:: +* Clock Manager Operations:: +* Clock Manager Directives:: +@end menu +@end ifinfo + +@ifinfo +@node Clock Manager Introduction, Clock Manager Background, Clock Manager, Clock Manager +@end ifinfo +@section Introduction + +The clock manager ... + +The directives provided by the clock manager are: + +@itemize @bullet +@item @code{clock_gettime} - +@item @code{clock_settime} - +@item @code{clock_getres} - +@item @code{nanosleep} - +@item @code{time} - +@end itemize + +@ifinfo +@node Clock Manager Background, Clock Manager Operations, Clock Manager Introduction, Clock Manager +@end ifinfo +@section Background + +@ifinfo +@node Clock Manager Operations, Clock Manager Directives, Clock Manager Background, Clock Manager +@end ifinfo +@section Operations + +@ifinfo +@node Clock Manager Directives, clock_gettime, Clock Manager Operations, Clock Manager +@end ifinfo +@section Directives +@ifinfo +@menu +* clock_gettime:: +* clock_settime:: +* clock_getres:: +* sleep:: +* nanosleep:: +* time:: +@end menu +@end ifinfo + +This section details the clock manager's directives. +A subsection is dedicated to each of this manager's directives +and describes the calling sequence, related constants, usage, +and status codes. + +@page +@ifinfo +@node clock_gettime, clock_settime, Clock Manager Directives, Clock Manager Directives +@end ifinfo +@subsection clock_gettime + +@subheading CALLING SEQUENCE: + +@example +#include + +int clock_gettime( + clockid_t clock_id, + struct timespec *tp +); +@end example + +@subheading STATUS CODES: + +On error, this routine returns -1 and sets errno to one of the following: + +@table @b +@item EINVAL +The tp pointer parameter is invalid. + +@item EINVAL +The clock_id specified is invalid. +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node clock_settime, clock_getres, clock_gettime, Clock Manager Directives +@end ifinfo +@subsection clock_settime + +@subheading CALLING SEQUENCE: + +@example +#include + +int clock_settime( + clockid_t clock_id, + const struct timespec *tp +); +@end example + +@subheading STATUS CODES: + +On error, this routine returns -1 and sets errno to one of the following: + +@table @b +@item EINVAL +The tp pointer parameter is invalid. + +@item EINVAL +The clock_id specified is invalid. + +@item EINVAL +The contents of the tp structure are invalid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node clock_getres, sleep, clock_settime, Clock Manager Directives +@end ifinfo +@subsection clock_getres + +@subheading CALLING SEQUENCE: + +@example +#include + +int clock_getres( + clockid_t clock_id, + struct timespec *res +); +@end example + +@subheading STATUS CODES: + +On error, this routine returns -1 and sets errno to one of the following: + +@table @b +@item EINVAL +The res pointer parameter is invalid. + +@item EINVAL +The clock_id specified is invalid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +If res is NULL, then the resolution is not returned. + +@page +@ifinfo +@node sleep, nanosleep, clock_getres, Clock Manager Directives +@end ifinfo +@subsection sleep + +@subheading CALLING SEQUENCE: + +@example +#include + +unsigned int sleep( + unsigned int seconds +); +@end example + +@subheading STATUS CODES: + +This routine returns the number of unslept seconds. + +@subheading DESCRIPTION: + +@subheading NOTES: + +This call is interruptible by a signal. + +@page +@ifinfo +@node nanosleep, time, sleep, Clock Manager Directives +@end ifinfo +@subsection nanosleep + +@subheading CALLING SEQUENCE: + +@example +#include + +int nanosleep( + const struct timespec *rqtp, + struct timespec *rmtp +); +@end example + +@subheading STATUS CODES: + +On error, this routine returns -1 and sets errno to one of the following: + +@table @b +@item EINTR +The routine was interrupted by a signal. + +@item EAGAIN +The requested sleep period specified negative seconds or nanoseconds. + +@item EINVAL +The requested sleep period specified an invalid number for the nanoseconds +field. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +This call is interruptible by a signal. + +@page +@ifinfo +@node time, Scheduler Manager, nanosleep, Clock Manager Directives +@end ifinfo +@subsection nanosleep + +@subheading CALLING SEQUENCE: + +@example +#include + +int time( + time_t *tloc +); +@end example + +@subheading STATUS CODES: + +This routine returns the number of seconds since the Epoch. + +@subheading DESCRIPTION: + +@subheading NOTES: + diff --git a/doc/new_chapters/cond.t b/doc/new_chapters/cond.t new file mode 100644 index 0000000000..e9c8abf460 --- /dev/null +++ b/doc/new_chapters/cond.t @@ -0,0 +1,386 @@ +@c +@c COPYRIGHT (c) 1988-1998. +@c On-Line Applications Research Corporation (OAR). +@c All rights reserved. +@c +@c $Id$ +@c + +@ifinfo +@node Condition Variable Manager, Condition Variable Manager Introduction, pthread_mutex_getprioceiling, Top +@end ifinfo +@chapter Condition Variable Manager +@ifinfo +@menu +* Condition Variable Manager Introduction:: +* Condition Variable Manager Background:: +* Condition Variable Manager Operations:: +* Condition Variable Manager Directives:: +@end menu +@end ifinfo + +@ifinfo +@node Condition Variable Manager Introduction, Condition Variable Manager Background, Condition Variable Manager, Condition Variable Manager +@end ifinfo +@section Introduction + +The condition variable manager ... + +The directives provided by the condition variable manager are: + +@itemize @bullet +@item @code{pthread_condattr_init} - +@item @code{pthread_condattr_destroy} - +@item @code{pthread_condattr_setpshared} - +@item @code{pthread_condattr_getpshared} - +@item @code{pthread_cond_init} - +@item @code{pthread_cond_destroy} - +@item @code{pthread_cond_signal} - +@item @code{pthread_cond_broadcast} - +@item @code{pthread_cond_wait} - +@item @code{pthread_cond_timedwait} - +@end itemize + +@ifinfo +@node Condition Variable Manager Background, Condition Variable Manager Operations, Condition Variable Manager Introduction, Condition Variable Manager +@end ifinfo +@section Background + +@ifinfo +@node Condition Variable Manager Operations, Condition Variable Manager Directives, Condition Variable Manager Background, Condition Variable Manager +@end ifinfo +@section Operations + +@ifinfo +@node Condition Variable Manager Directives, pthread_condattr_init, Condition Variable Manager Operations, Condition Variable Manager +@end ifinfo +@section Directives +@ifinfo +@menu +* pthread_condattr_init:: +* pthread_condattr_destroy:: +* pthread_condattr_setpshared:: +* pthread_condattr_getpshared:: +* pthread_cond_init:: +* pthread_cond_destroy:: +* pthread_cond_signal:: +* pthread_cond_broadcast:: +* pthread_cond_wait:: +* pthread_cond_timedwait:: +@end menu +@end ifinfo + +This section details the condition variable manager's directives. +A subsection is dedicated to each of this manager's directives +and describes the calling sequence, related constants, usage, +and status codes. + +@page +@ifinfo +@node pthread_condattr_init, pthread_condattr_destroy, Condition Variable Manager Directives, Condition Variable Manager Directives +@end ifinfo +@subsection pthread_condattr_init + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_condattr_init( + pthread_condattr_t *attr +); +@end example + +@subheading STATUS CODES: +@table @b +@item ENOMEM +Insufficient memory is available to initialize the condition variable +attributes object. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_condattr_destroy, pthread_condattr_setpshared, pthread_condattr_init, Condition Variable Manager Directives +@end ifinfo +@subsection pthread_condattr_destroy + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_condattr_destroy( + pthread_condattr_t *attr +); +@end example + +@subheading STATUS CODES: +@table @b +@item EINVAL +The attribute object specified is invalid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_condattr_setpshared, pthread_condattr_getpshared, pthread_condattr_destroy, Condition Variable Manager Directives +@end ifinfo +@subsection pthread_condattr_setpshared + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_condattr_setpshared( + pthread_condattr_t *attr, + int pshared +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +Invalid argument passed. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_condattr_getpshared, pthread_cond_init, pthread_condattr_setpshared, Condition Variable Manager Directives +@end ifinfo +@subsection pthread_condattr_getpshared + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_condattr_getpshared( + const pthread_condattr_t *attr, + int *pshared +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +Invalid argument passed. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + + +@page +@ifinfo +@node pthread_cond_init, pthread_cond_destroy, pthread_condattr_getpshared, Condition Variable Manager Directives +@end ifinfo +@subsection pthread_cond_init + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_cond_init( + pthread_cond_t *cond, + const pthread_condattr_t *attr +); +@end example + +@subheading STATUS CODES: +@table @b +@item EAGAIN +The system lacked a resource other than memory necessary to create the +initialize the condition variable object. + +@item ENOMEM +Insufficient memory is available to initialize the condition variable object. + +@item EBUSY +The specified condition variable has already been initialized. + +@item EINVAL +The specified attribute value is invalid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_cond_destroy, pthread_cond_signal, pthread_cond_init, Condition Variable Manager Directives +@end ifinfo +@subsection pthread_cond_destroy + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_cond_destroy( + pthread_cond_t *cond +); +@end example + +@subheading STATUS CODES: +@table @b +@item EINVAL +The specified condition variable is invalid. + +@item EBUSY +The specified condition variable is currently in use. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_cond_signal, pthread_cond_broadcast, pthread_cond_destroy, Condition Variable Manager Directives +@end ifinfo +@subsection pthread_cond_signal + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_cond_signal( + pthread_cond_t *cond +); +@end example + +@subheading STATUS CODES: +@table @b +@item EINVAL +The specified condition variable is not valid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +This routine should not be invoked from a handler from an asynchronous signal +handler or an interrupt service routine. + +@page +@ifinfo +@node pthread_cond_broadcast, pthread_cond_wait, pthread_cond_signal, Condition Variable Manager Directives +@end ifinfo +@subsection pthread_cond_broadcast + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_cond_broadcast( + pthread_cond_t *cond +); +@end example + +@subheading STATUS CODES: +@table @b +@item EINVAL +The specified condition variable is not valid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +This routine should not be invoked from a handler from an asynchronous signal +handler or an interrupt service routine. + +@page +@ifinfo +@node pthread_cond_wait, pthread_cond_timedwait, pthread_cond_broadcast, Condition Variable Manager Directives +@end ifinfo +@subsection pthread_cond_wait + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_cond_wait( + pthread_cond_t *cond, + pthread_mutex_t *mutex +); +@end example + +@subheading STATUS CODES: +@table @b +@item EINVAL +The specified condition variable or mutex is not initialized OR different +mutexes were specified for concurrent pthread_cond_wait() and +pthread_cond_timedwait() operations on the same condition variable OR +the mutex was not owned by the current thread at the time of the call. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_cond_timedwait, Key Manager, pthread_cond_wait, Condition Variable Manager Directives +@end ifinfo +@subsection pthread_cond_timedwait + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_cond_timedwait( + pthread_cond_t *cond, + pthread_mutex_t *mutex, + const struct timespec *abstime +); +@end example + +@subheading STATUS CODES: +@table @b +@item EINVAL +The specified condition variable or mutex is not initialized OR different +mutexes were specified for concurrent pthread_cond_wait() and +pthread_cond_timedwait() operations on the same condition variable OR +the mutex was not owned by the current thread at the time of the call. + +@item ETIMEDOUT +The specified time has elapsed without the condition variable being +satisfied. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + diff --git a/doc/new_chapters/key.t b/doc/new_chapters/key.t new file mode 100644 index 0000000000..16196b6116 --- /dev/null +++ b/doc/new_chapters/key.t @@ -0,0 +1,179 @@ +@c +@c COPYRIGHT (c) 1988-1998. +@c On-Line Applications Research Corporation (OAR). +@c All rights reserved. +@c +@c $Id$ +@c + +@ifinfo +@node Key Manager, Key Manager Introduction, pthread_cond_timedwait, Top +@end ifinfo +@chapter Key Manager +@ifinfo +@menu +* Key Manager Introduction:: +* Key Manager Background:: +* Key Manager Operations:: +* Key Manager Directives:: +@end menu +@end ifinfo + +@ifinfo +@node Key Manager Introduction, Key Manager Background, Key Manager, Key Manager +@end ifinfo +@section Introduction + +The key manager ... + +The directives provided by the key manager are: + +@itemize @bullet +@item @code{pthread_key_create} - +@item @code{pthread_key_delete} - +@item @code{pthread_setspecific} - +@item @code{pthread_getspecific} - +@end itemize + +@ifinfo +@node Key Manager Background, Key Manager Operations, Key Manager Introduction, Key Manager +@end ifinfo +@section Background + +@ifinfo +@node Key Manager Operations, Key Manager Directives, Key Manager Background, Key Manager +@end ifinfo +@section Operations + +@ifinfo +@node Key Manager Directives, pthread_key_create, Key Manager Operations, Key Manager +@end ifinfo +@section Directives +@ifinfo +@menu +* pthread_key_create:: +* pthread_key_delete:: +* pthread_setspecific:: +* pthread_getspecific:: +@end menu +@end ifinfo + +This section details the key manager's directives. +A subsection is dedicated to each of this manager's directives +and describes the calling sequence, related constants, usage, +and status codes. + +@page +@ifinfo +@node pthread_key_create, pthread_key_delete, Key Manager Directives, Key Manager Directives +@end ifinfo +@subsection pthread_key_create + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_key_create( + pthread_key_t *key, + void (*destructor)( void * ) +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EAGAIN +There were not enough resources available to create another key. + +@item ENOMEM +Insufficient memory exists to create the key. + +@end table + +@page +@ifinfo +@node pthread_key_delete, pthread_setspecific, pthread_key_create, Key Manager Directives +@end ifinfo +@subsection pthread_key_delete + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_key_delete( + pthread_key_t key, +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +The key was invalid + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_setspecific, pthread_getspecific, pthread_key_delete, Key Manager Directives +@end ifinfo +@subsection pthread_setspecific + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_setspecific( + pthread_key_t key, + const void *value +); +@end example + +@subheading STATUS CODES: +@table @b +@item EINVAL +The specified key is invalid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_getspecific, Clock Manager, pthread_setspecific, Key Manager Directives +@end ifinfo +@subsection pthread_getspecific + +@subheading CALLING SEQUENCE: + +@example +#include + +void *pthread_getspecific( + pthread_key_t key +); +@end example + +@subheading STATUS CODES: +@table @b +@item NULL +There is no thread-specific data associated with the specified key. + +@item non-NULL +The data associated with the specified key. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + diff --git a/doc/new_chapters/mutex.t b/doc/new_chapters/mutex.t new file mode 100644 index 0000000000..16cbe6467f --- /dev/null +++ b/doc/new_chapters/mutex.t @@ -0,0 +1,642 @@ +@c +@c COPYRIGHT (c) 1988-1998. +@c On-Line Applications Research Corporation (OAR). +@c All rights reserved. +@c +@c $Id$ +@c + +@ifinfo +@node Mutex Manager, Mutex Manager Introduction, alarm, Top +@end ifinfo +@chapter Mutex Manager +@ifinfo +@menu +* Mutex Manager Introduction:: +* Mutex Manager Background:: +* Mutex Manager Operations:: +* Mutex Manager Directives:: +@end menu +@end ifinfo + +@ifinfo +@node Mutex Manager Introduction, Mutex Manager Background, Mutex Manager, Mutex Manager +@end ifinfo +@section Introduction + +The mutex manager ... + +The directives provided by the mutex manager are: + +@itemize @bullet +@item @code{pthread_mutexattr_init} - +@item @code{pthread_mutexattr_destroy} - +@item @code{pthread_mutexattr_setprotocol} - +@item @code{pthread_mutexattr_getprotocol} - +@item @code{pthread_mutexattr_setprioceiling} - +@item @code{pthread_mutexattr_getprioceiling} - +@item @code{pthread_mutexattr_setpshared} - +@item @code{pthread_mutexattr_getpshared} - +@item @code{pthread_mutex_init} - +@item @code{pthread_mutex_destroy} - +@item @code{pthread_mutex_lock} - +@item @code{pthread_mutex_trylock} - +@item @code{pthread_mutex_timedlock} - +@item @code{pthread_mutex_unlock} - +@item @code{pthread_mutex_setprioceiling} - +@item @code{pthread_mutex_getprioceiling} - +@end itemize + +@ifinfo +@node Mutex Manager Background, Mutex Manager Operations, Mutex Manager Introduction, Mutex Manager +@end ifinfo +@section Background + +@ifinfo +@node Mutex Manager Operations, Mutex Manager Directives, Mutex Manager Background, Mutex Manager +@end ifinfo +@section Operations + +@ifinfo +@node Mutex Manager Directives, pthread_mutexattr_init, Mutex Manager Operations, Mutex Manager +@end ifinfo +@section Directives +@ifinfo +@menu +* pthread_mutexattr_init:: +* pthread_mutexattr_destroy:: +* pthread_mutexattr_setprotocol:: +* pthread_mutexattr_getprotocol:: +* pthread_mutexattr_setprioceiling:: +* pthread_mutexattr_getprioceiling:: +* pthread_mutexattr_setpshared:: +* pthread_mutexattr_getpshared:: +* pthread_mutex_init:: +* pthread_mutex_destroy:: +* pthread_mutex_lock:: +* pthread_mutex_trylock:: +* pthread_mutex_timedlock:: +* pthread_mutex_unlock:: +* pthread_mutex_setprioceiling:: +* pthread_mutex_getprioceiling:: +@end menu +@end ifinfo + +This section details the mutex manager's directives. +A subsection is dedicated to each of this manager's directives +and describes the calling sequence, related constants, usage, +and status codes. + +@page +@ifinfo +@node pthread_mutexattr_init, pthread_mutexattr_destroy, Mutex Manager Directives, Mutex Manager Directives +@end ifinfo +@subsection pthread_mutexattr_init + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_mutexattr_init( + pthread_mutexattr_t *attr +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +The attribute pointer argument is invalid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_mutexattr_destroy, pthread_mutexattr_setprotocol, pthread_mutexattr_init, Mutex Manager Directives +@end ifinfo +@subsection pthread_mutexattr_destroy + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_mutexattr_destroy( + pthread_mutexattr_t *attr +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +The attribute pointer argument is invalid. + +@item EINVAL +The attribute set is not initialized. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_mutexattr_setprotocol, pthread_mutexattr_getprotocol, pthread_mutexattr_destroy, Mutex Manager Directives +@end ifinfo +@subsection pthread_mutexattr_setprotocol + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_mutexattr_setprotocol( + pthread_mutexattr_t *attr, + int protocol +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +The attribute pointer argument is invalid. + +@item EINVAL +The attribute set is not initialized. + +@item EINVAL +The protocol argument is invalid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_mutexattr_getprotocol, pthread_mutexattr_setprioceiling, pthread_mutexattr_setprotocol, Mutex Manager Directives +@end ifinfo +@subsection pthread_mutexattr_getprotocol + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_mutexattr_getprotocol( + pthread_mutexattr_t *attr, + int *protocol +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +The attribute pointer argument is invalid. + +@item EINVAL +The attribute set is not initialized. + +@item EINVAL +The protocol pointer argument is invalid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_mutexattr_setprioceiling, pthread_mutexattr_getprioceiling, pthread_mutexattr_getprotocol, Mutex Manager Directives +@end ifinfo +@subsection pthread_mutexattr_setprioceiling + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_mutexattr_setprioceiling( + pthread_mutexattr_t *attr, + int prioceiling +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +The attribute pointer argument is invalid. + +@item EINVAL +The attribute set is not initialized. + +@item EINVAL +The prioceiling argument is invalid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_mutexattr_getprioceiling, pthread_mutexattr_setpshared, pthread_mutexattr_setprioceiling, Mutex Manager Directives +@end ifinfo +@subsection pthread_mutexattr_getprioceiling + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_mutexattr_getprioceiling( + const pthread_mutexattr_t *attr, + int *prioceiling +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +The attribute pointer argument is invalid. + +@item EINVAL +The attribute set is not initialized. + +@item EINVAL +The prioceiling pointer argument is invalid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_mutexattr_setpshared, pthread_mutexattr_getpshared, pthread_mutexattr_getprioceiling, Mutex Manager Directives +@end ifinfo +@subsection pthread_mutexattr_setpshared + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_mutexattr_setpshared( + pthread_mutexattr_t *attr, + int pshared +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +The attribute pointer argument is invalid. + +@item EINVAL +The attribute set is not initialized. + +@item EINVAL +The pshared argument is invalid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_mutexattr_getpshared, pthread_mutex_init, pthread_mutexattr_setpshared, Mutex Manager Directives +@end ifinfo +@subsection pthread_mutexattr_getpshared + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_mutexattr_getpshared( + const pthread_mutexattr_t *attr, + int *pshared +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +The attribute pointer argument is invalid. + +@item EINVAL +The attribute set is not initialized. + +@item EINVAL +The pshared pointer argument is invalid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_mutex_init, pthread_mutex_destroy, pthread_mutexattr_getpshared, Mutex Manager Directives +@end ifinfo +@subsection pthread_mutex_init + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_mutex_init( + pthread_mutex_t *mutex, + const pthread_mutexattr_t *attr +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +The attribute set is not initialized. + +@item EINVAL +The specified protocol is invalid. + +@item EAGAIN +The system lacked the necessary resources to initialize another mutex. + +@item ENOMEM +Insufficient memory exists to initialize the mutex. + +@item EBUSY +Attempted to reinialize the object reference by mutex, a previously +initialized, but not yet destroyed. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_mutex_destroy, pthread_mutex_lock, pthread_mutex_init, Mutex Manager Directives +@end ifinfo +@subsection pthread_mutex_destroy + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_mutex_destroy( + pthread_mutex_t *mutex +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +The specified mutex is invalid. + +@item EBUSY +Attempted to destroy the object reference by mutex, while it is locked or +referenced by another thread. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_mutex_lock, pthread_mutex_trylock, pthread_mutex_destroy, Mutex Manager Directives +@end ifinfo +@subsection pthread_mutex_lock + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_mutex_lock( + pthread_mutex_t *mutex +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +The specified mutex is invalid. + +@item EINVAL +The mutex has the protocol attribute of PTHREAD_PRIO_PROTECT and the +priority of the calling thread is higher than the current priority +ceiling. + +@item EDEADLK +The current thread already owns the mutex. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_mutex_trylock, pthread_mutex_timedlock, pthread_mutex_lock, Mutex Manager Directives +@end ifinfo +@subsection pthread_mutex_trylock + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_mutex_trylock( + pthread_mutex_t *mutex +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +The specified mutex is invalid. + +@item EINVAL +The mutex has the protocol attribute of PTHREAD_PRIO_PROTECT and the +priority of the calling thread is higher than the current priority +ceiling. + +@item EDEADLK +The current thread already owns the mutex. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_mutex_timedlock, pthread_mutex_unlock, pthread_mutex_trylock, Mutex Manager Directives +@end ifinfo +@subsection pthread_mutex_timedlock + +@subheading CALLING SEQUENCE: + +@example +#include +#include + +int pthread_mutex_timedlock( + pthread_mutex_t *mutex, + const struct timespec *timeout +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +The specified mutex is invalid. + +@item EINVAL +The nanoseconds field of timeout is invalid. + +@item EINVAL +The mutex has the protocol attribute of PTHREAD_PRIO_PROTECT and the +priority of the calling thread is higher than the current priority +ceiling. + +@item EDEADLK +The current thread already owns the mutex. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + + +@page +@ifinfo +@node pthread_mutex_unlock, pthread_mutex_setprioceiling, pthread_mutex_timedlock, Mutex Manager Directives +@end ifinfo +@subsection pthread_mutex_unlock + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_mutex_unlock( + pthread_mutex_t *mutex +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +The specified mutex is invalid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_mutex_setprioceiling, pthread_mutex_getprioceiling, pthread_mutex_unlock, Mutex Manager Directives +@end ifinfo +@subsection pthread_mutex_setprioceiling + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_mutex_setprioceiling( + pthread_mutex_t *mutex, + int prioceiling, + int *oldceiling +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +The oldceiling pointer parameter is invalid. + +@item EINVAL +The prioceiling parameter is an invalid priority. + +@item EINVAL +The specified mutex is invalid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_mutex_getprioceiling, Condition Variable Manager, pthread_mutex_setprioceiling, Mutex Manager Directives +@end ifinfo +@subsection pthread_mutex_getprioceiling + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_mutex_getprioceiling( + pthread_mutex_t *mutex, + int *prioceiling +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +The prioceiling pointer parameter is invalid. + +@item EINVAL +The specified mutex is invalid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + diff --git a/doc/new_chapters/preface.t b/doc/new_chapters/preface.t new file mode 100644 index 0000000000..660819a77c --- /dev/null +++ b/doc/new_chapters/preface.t @@ -0,0 +1,21 @@ +@c +@c COPYRIGHT (c) 1988-1998. +@c On-Line Applications Research Corporation (OAR). +@c All rights reserved. +@c +@c $Id$ +@c + +@ifinfo +@node Preface, Thread Manager, Top, Top +@end ifinfo +@unnumbered Preface + +This is the user's guide for the POSIX API support for RTEMS. + +At this point, this is just a basic shell of what this manual +should ultimately be. + +Much of the POSIX API standard is actually implemented in the +newlib ANSI C Library. Please refer to documentation on +newlib for more information on what it supplies. diff --git a/doc/new_chapters/sched.t b/doc/new_chapters/sched.t new file mode 100644 index 0000000000..c37c24964d --- /dev/null +++ b/doc/new_chapters/sched.t @@ -0,0 +1,228 @@ +@c +@c COPYRIGHT (c) 1988-1998. +@c On-Line Applications Research Corporation (OAR). +@c All rights reserved. +@c +@c $Id$ +@c + +@ifinfo +@node Scheduler Manager, Scheduler Manager Introduction, time, Top +@end ifinfo +@chapter Scheduler Manager +@ifinfo +@menu +* Scheduler Manager Introduction:: +* Scheduler Manager Background:: +* Scheduler Manager Operations:: +* Scheduler Manager Directives:: +@end menu +@end ifinfo + +@ifinfo +@node Scheduler Manager Introduction, Scheduler Manager Background, Scheduler Manager, Scheduler Manager +@end ifinfo +@section Introduction + +The scheduler manager ... + +The directives provided by the scheduler manager are: + +@itemize @bullet +@item @code{sched_get_priority_min} - +@item @code{sched_get_priority_max} - +@item @code{sched_rr_get_interval} - +@item @code{sched_yield} - +@end itemize + +@ifinfo +@node Scheduler Manager Background, Priority, Scheduler Manager Introduction, Scheduler Manager +@end ifinfo +@section Background +@ifinfo +@menu +* Priority:: +* Scheduling Policies:: +@end menu +@end ifinfo + +@ifinfo +@node Priority, Scheduling Policies, Scheduler Manager Background, Scheduler Manager Background +@end ifinfo +@subsection Priority + +In the RTEMS implementation of the POSIX API, the priorities range from +the low priority of sched_get_priority_min() to the highest priority of +sched_get_priority_max(). Numerically higher values represent higher +priorities. + +@ifinfo +@node Scheduling Policies, Scheduler Manager Operations, Priority, Scheduler Manager Background +@end ifinfo +@subsection Scheduling Policies + +The following scheduling policies are available: + +@table @b +@item SCHED_FIFO +Priority-based, preemptive scheduling with no timeslicing. This is equivalent +to what is called "manual round-robin" scheduling. + +@item SCHED_RR +Priority-based, preemptive scheduling with timeslicing. Time quantums are +maintained on a per-thread basis and are not reset at each context switch. +Thus, a thread which is preempted and subsequently resumes execution will +attempt to complete the unused portion of its time quantum. + +@item SCHED_OTHER +Priority-based, preemptive scheduling with timeslicing. Time quantums are +maintained on a per-thread basis and are reset at each context switch. + +@item SCHED_SPORADIC +Priority-based, preemptive scheduling utilizing three additional parameters: +budget, replenishment period, and low priority. Under this policy, the +thread is allowed to execute for "budget" amount of time before its priority +is lowered to "low priority". At the end of each replenishment period, +the thread resumes its initial priority and has its budget replenished. + +@end table + +@ifinfo +@node Scheduler Manager Operations, Scheduler Manager Directives, Scheduling Policies, Scheduler Manager +@end ifinfo +@section Operations + +@ifinfo +@node Scheduler Manager Directives, sched_get_priority_min, Scheduler Manager Operations, Scheduler Manager +@end ifinfo +@section Directives +@ifinfo +@menu +* sched_get_priority_min:: +* sched_get_priority_max:: +* sched_rr_get_interval:: +* sched_yield:: +@end menu +@end ifinfo + +This section details the scheduler manager's directives. +A subsection is dedicated to each of this manager's directives +and describes the calling sequence, related constants, usage, +and status codes. + +@page +@ifinfo +@node sched_get_priority_min, sched_get_priority_max, Scheduler Manager Directives, Scheduler Manager Directives +@end ifinfo +@subsection sched_get_priority_min + +@subheading CALLING SEQUENCE: + +@example +#include + +int sched_get_priority_min( + int policy +); +@end example + +@subheading STATUS CODES: + +On error, this routine returns -1 and sets errno to one of the following: + +@table @b +@item EINVAL +The indicated policy is invalid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node sched_get_priority_max, sched_rr_get_interval, sched_get_priority_min, Scheduler Manager Directives +@end ifinfo +@subsection sched_get_priority_max + +@subheading CALLING SEQUENCE: + +@example +#include + +int sched_get_priority_max( + int policy +); +@end example + +@subheading STATUS CODES: + +On error, this routine returns -1 and sets errno to one of the following: + +@table @b +@item EINVAL +The indicated policy is invalid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node sched_rr_get_interval, sched_yield, sched_get_priority_max, Scheduler Manager Directives +@end ifinfo +@subsection sched_rr_get_interval + +@subheading CALLING SEQUENCE: + +@example +#include + +int sched_rr_get_interval( + pid_t pid, + struct timespec *interval +); +@end example + +@subheading STATUS CODES: + +On error, this routine returns -1 and sets errno to one of the following: + +@table @b +@item ESRCH +The indicated process id is invalid. + +@item EINVAL +The specified interval pointer parameter is invalid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node sched_yield, Command and Variable Index, sched_rr_get_interval, Scheduler Manager Directives +@end ifinfo +@subsection sched_yield + +@subheading CALLING SEQUENCE: + +@example +#include + +int sched_yield( void ); +@end example + +@subheading STATUS CODES: + +This routine always returns zero to indicate success. + +@subheading DESCRIPTION: + +@subheading NOTES: + diff --git a/doc/new_chapters/signal.t b/doc/new_chapters/signal.t new file mode 100644 index 0000000000..6d90b8cfff --- /dev/null +++ b/doc/new_chapters/signal.t @@ -0,0 +1,691 @@ +@c +@c COPYRIGHT (c) 1988-1998. +@c On-Line Applications Research Corporation (OAR). +@c All rights reserved. +@c +@c $Id$ +@c + +@ifinfo +@node Signal Manager, Signal Manager Introduction, pthread_getschedparam, Top +@end ifinfo +@chapter Signal Manager +@ifinfo +@menu +* Signal Manager Introduction:: +* Signal Manager Background:: +* Signal Manager Operations:: +* Signal Manager Directives:: +@end menu +@end ifinfo + +@ifinfo +@node Signal Manager Introduction, Signal Manager Background, Signal Manager, Signal Manager +@end ifinfo +@section Introduction + +The signal manager ... + +The directives provided by the signal manager are: + +@itemize @bullet +@item @code{sigaddset} - +@item @code{sigdelset} - +@item @code{sigfillset} - +@item @code{sigismember} - +@item @code{sigemptyset} - +@item @code{sigaction} - +@item @code{pthread_kill} - +@item @code{sigprocmask} - +@item @code{pthread_sigmask} - +@item @code{kill} - +@item @code{sigpending} - +@item @code{sigsuspend} - +@item @code{pause} - +@item @code{sigwait} - +@item @code{sigwaitinfo} - +@item @code{sigtimedwait} - +@item @code{sigqueue} - +@item @code{alarm} - +@end itemize + +@ifinfo +@node Signal Manager Background, Signal Delivery, Signal Manager Introduction, Signal Manager +@end ifinfo +@section Background +@ifinfo +@menu +* Signal Delivery:: +@end menu +@end ifinfo + + +@ifinfo +@node Signal Delivery, Signal Manager Operations, Signal Manager Background, Signal Manager Background +@end ifinfo +@subsection Signal Delivery + +Signals directed at a thread are delivered to the specified thread. + +Signals directed at a process are delivered to a thread which is selected +based on the following algorithm: + +@enumerate +@item If the action for this signal is currently SIG_IGN, then the signal +is simply ignored. + +@item If the currently executing thread has the signal unblocked, then +the signal is delivered to it. + +@item If any threads are currently blocked waiting for this signal +(sigwait()), then the signal is delivered to the highest priority +thread waiting for this signal. + +@item If any other threads are willing to accept delivery of the signal, then +the signal is delivered to the highest priority thread of this set. In the +event, multiple threads of the same priority are willing to accept this +signal, then priority is given first to ready threads, then to threads +blocked on calls which may be interrupted, and finally to threads blocked +on non-interruptible calls. + +@item In the event the signal still can not be delivered, then it is left +pending. The first thread to unblock the signal (sigprocmask() or +pthread_sigprocmask()) or to wait for this signal (sigwait()) will be +the recipient of the signal. + +@end enumerate + +@ifinfo +@node Signal Manager Operations, Signal Manager Directives, Signal Delivery, Signal Manager +@end ifinfo +@section Operations + +@ifinfo +@node Signal Manager Directives, sigaddset, Signal Manager Operations, Signal Manager +@end ifinfo +@section Directives +@ifinfo +@menu +* sigaddset:: +* sigdelset:: +* sigfillset:: +* sigismember:: +* sigemptyset:: +* sigaction:: +* pthread_kill:: +* sigprocmask:: +* pthread_sigmask:: +* kill:: +* sigpending:: +* sigsuspend:: +* pause:: +* sigwait:: +* sigwaitinfo:: +* sigtimedwait:: +* sigqueue:: +* alarm:: +@end menu +@end ifinfo + +This section details the signal manager's directives. +A subsection is dedicated to each of this manager's directives +and describes the calling sequence, related constants, usage, +and status codes. + +@page +@ifinfo +@node sigaddset, sigdelset, Signal Manager Directives, Signal Manager Directives +@end ifinfo +@subsection sigaddset + +@subheading CALLING SEQUENCE: + +@example +#include + +int sigaddset( + sigset_t *set, + int signo +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +Invalid argument passed. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node sigdelset, sigfillset, sigaddset, Signal Manager Directives +@end ifinfo +@subsection sigdelset + +@subheading CALLING SEQUENCE: + +@example +#include + +int sigdelset( + sigset_t *set, + int signo +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +Invalid argument passed. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node sigfillset, sigismember, sigdelset, Signal Manager Directives +@end ifinfo +@subsection sigfillset + +@subheading CALLING SEQUENCE: + +@example +#include + +int sigfillset( + sigset_t *set +); +@end example + +@subheading STATUS CODES: +@table @b +@item EINVAL +Invalid argument passed. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node sigismember, sigemptyset, sigfillset, Signal Manager Directives +@end ifinfo +@subsection sigismember + +@subheading CALLING SEQUENCE: + +@example +#include + +int sigismember( + const sigset_t *set, + int signo +); +@end example + +@subheading STATUS CODES: +@table @b +@item EINVAL +Invalid argument passed. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node sigemptyset, sigaction, sigismember, Signal Manager Directives +@end ifinfo +@subsection sigemptyset + +@subheading CALLING SEQUENCE: + +@example +#include + +int sigemptyset( + sigset_t *set +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +Invalid argument passed. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node sigaction, pthread_kill, sigemptyset, Signal Manager Directives +@end ifinfo +@subsection sigaction + +@subheading CALLING SEQUENCE: + +@example +#include + +int sigaction( + int sig, + const struct sigaction *act, + struct sigaction *oact +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +Invalid argument passed. + +@item ENOTSUP +Realtime Signals Extension option not supported. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +The signal number cannot be SIGKILL. +@page +@ifinfo +@node pthread_kill, sigprocmask, sigaction, Signal Manager Directives +@end ifinfo +@subsection pthread_kill + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_kill( + pthread_t thread, + int sig +); +@end example + +@subheading STATUS CODES: +@table @b +@item ESRCH +The thread indicated by the parameter thread is invalid. + +@item EINVAL +Invalid argument passed. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node sigprocmask, pthread_sigmask, pthread_kill, Signal Manager Directives +@end ifinfo +@subsection sigprocmask + +@subheading CALLING SEQUENCE: + +@example +#include + +int sigprocmask( + int how, + const sigset_t *set, + sigset_t *oset +); +@end example + +@subheading STATUS CODES: +@table @b +@item EINVAL +Invalid argument passed. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + + +@page +@ifinfo +@node pthread_sigmask, kill, sigprocmask, Signal Manager Directives +@end ifinfo +@subsection pthread_sigmask + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_sigmask( + int how, + const sigset_t *set, + sigset_t *oset +); +@end example + +@subheading STATUS CODES: +@table @b +@item EINVAL +Invalid argument passed. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + + +@page +@ifinfo +@node kill, sigpending, pthread_sigmask, Signal Manager Directives +@end ifinfo +@subsection kill + +@subheading CALLING SEQUENCE: + +@example +#include +#include + +int kill( + pid_t pid, + int sig +); +@end example + +@subheading STATUS CODES: +@table @b +@item EINVAL +Invalid argument passed. + +@item EPERM +Process does not have permission to send the signal to any receiving process. + +@item ESRCH +The process indicated by the parameter pid is invalid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + + +@page +@ifinfo +@node sigpending, sigsuspend, kill, Signal Manager Directives +@end ifinfo +@subsection sigpending + +@subheading CALLING SEQUENCE: + +@example +#include + +int sigpending( + const sigset_t *set +); +@end example + +@subheading STATUS CODES: + +On error, this routine returns -1 and sets errno to one of the following: + +@table @b +@item EFAULT +Invalid address for set. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node sigsuspend, pause, sigpending, Signal Manager Directives +@end ifinfo +@subsection sigsuspend + +@subheading CALLING SEQUENCE: + +@example +#include + +int sigsuspend( + const sigset_t *sigmask +); +@end example + +@subheading STATUS CODES: +@table @b +Returns -1 and sets errno. + +@item EINTR +Signal interrupted this function. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pause, sigwait, sigsuspend, Signal Manager Directives +@end ifinfo +@subsection pause + +@subheading CALLING SEQUENCE: + +@example +#include + +int pause( void ); +@end example + +@subheading STATUS CODES: +@table @b +Returns -1 and sets errno. + +@item EINTR +Signal interrupted this function. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node sigwait, sigwaitinfo, pause, Signal Manager Directives +@end ifinfo +@subsection sigwait + +@subheading CALLING SEQUENCE: + +@example +#include + +int sigwait( + const sigset_t *set, + int *sig +); +@end example + +@subheading STATUS CODES: +@table @b +@item EINVAL +Invalid argument passed. + +@item EINTR +Signal interrupted this function. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node sigwaitinfo, sigtimedwait, sigwait, Signal Manager Directives +@end ifinfo +@subsection sigwaitinfo + +@subheading CALLING SEQUENCE: + +@example +#include + +int sigwaitinfo( + const sigset_t *set, + siginfo_t *info +); +@end example + +@subheading STATUS CODES: +@table @b +@item EINTR +Signal interrupted this function. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node sigtimedwait, sigqueue, sigwaitinfo, Signal Manager Directives +@end ifinfo +@subsection sigtimedwait + +@subheading CALLING SEQUENCE: + +@example +#include + +int sigtimedwait( + const sigset_t *set, + siginfo_t *info, + const struct timespec *timeout +); +@end example + +@subheading STATUS CODES: +@table @b +@item EAGAIN +Timed out while waiting for the specified signal set. + +@item EINVAL +Nanoseconds field of the timeout argument is invalid. + +@item EINTR +Signal interrupted this function. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +If timeout is NULL, then the thread will wait forever for the specified +signal set. + +@page +@ifinfo +@node sigqueue, alarm, sigtimedwait, Signal Manager Directives +@end ifinfo +@subsection sigqueue + +@subheading CALLING SEQUENCE: + +@example +#include + +int sigqueue( + pid_t pid, + int signo, + const union sigval value +); +@end example + +@subheading STATUS CODES: + +@table @b + +@item EAGAIN +No resources available to queue the signal. The process has already +queued SIGQUEUE_MAX signals that are still pending at the receiver +or the systemwide resource limit has been exceeded. + +@item EINVAL +The value of the signo argument is an invalid or unsupported signal +number. + +@item EPERM +The process does not have the appropriate privilege to send the signal +to the receiving process. + +@item ESRCH +The process pid does not exist. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + + +@page +@ifinfo +@node alarm, Mutex Manager, sigqueue, Signal Manager Directives +@end ifinfo +@subsection alarm + +@subheading CALLING SEQUENCE: + +@example +#include + +unsigned int alarm( + unsigned int seconds +); +@end example + +@subheading STATUS CODES: + +If there was a previous alarm() request with time remaining, then this routine +returns the number of seconds until that outstanding alarm would have fired. +If no previous alarm() request was outstanding, then zero is returned. + +@subheading DESCRIPTION: + +@subheading NOTES: + + diff --git a/doc/new_chapters/thread.t b/doc/new_chapters/thread.t new file mode 100644 index 0000000000..bb223a37ed --- /dev/null +++ b/doc/new_chapters/thread.t @@ -0,0 +1,1025 @@ +@c +@c COPYRIGHT (c) 1988-1998. +@c On-Line Applications Research Corporation (OAR). +@c All rights reserved. +@c +@c $Id$ +@c + +@ifinfo +@node Thread Manager, Thread Manager Introduction, Preface, Top +@end ifinfo +@chapter Thread Manager +@ifinfo +@menu +* Thread Manager Introduction:: +* Thread Manager Background:: +* Thread Manager Operations:: +* Thread Manager Directives:: +@end menu +@end ifinfo + +@ifinfo +@node Thread Manager Introduction, Thread Manager Background, Thread Manager, Thread Manager +@end ifinfo +@section Introduction + +The thread manager ... + +The directives provided by the thread manager are: + +@itemize @bullet +@item @code{pthread_attr_init} - +@item @code{pthread_attr_destroy} - +@item @code{pthread_attr_setdetachstate} - +@item @code{pthread_attr_getdetachstate} - +@item @code{pthread_attr_setstacksize} - +@item @code{pthread_attr_getstacksize} - +@item @code{pthread_attr_setstackaddr} - +@item @code{pthread_attr_getstackaddr} - +@item @code{pthread_attr_setscope} - +@item @code{pthread_attr_getscope} - +@item @code{pthread_attr_setinheritsched} - +@item @code{pthread_attr_getinheritsched} - +@item @code{pthread_attr_setschedpolicy} - +@item @code{pthread_attr_getschedpolicy} - +@item @code{pthread_attr_setschedparam} - +@item @code{pthread_attr_getschedparam} - +@item @code{pthread_create} - +@item @code{pthread_exit} - +@item @code{pthread_detach} - +@item @code{pthread_join} - +@item @code{pthread_self} - +@item @code{pthread_equal} - +@item @code{pthread_once} - +@item @code{pthread_setschedparam} - +@item @code{pthread_getschedparam} - +@end itemize + +@ifinfo +@node Thread Manager Background, Thread Attributes, Thread Manager Introduction, Thread Manager +@end ifinfo +@section Background +@ifinfo +@menu +* Thread Attributes:: +@end menu +@end ifinfo + +@ifinfo +@node Thread Attributes, Thread Manager Operations, Thread Manager Background, Thread Manager Background +@end ifinfo +@subsection Thread Attributes + +Thread attributes are utilized only at thread creation time. + +@table @b +@item stack address +is the address of the optionally user specified stack area for this thread. +If this value is NULL, then RTEMS allocates the memory for the thread stack +from the RTEMS Workspace Area. Otherwise, this is the user specified +address for the memory to be used for the thread's stack. Each thread must +have a distinct stack area. Each processor family has different alignment +rules which should be followed. + +@item stack size +is the minimum desired size for this thread's stack area. +If the size of this area as specified by the stack size attribute +is smaller than the minimum for this processor family and the stack +is not user specified, then RTEMS will automatically allocate a +stack of the minimum size for this processor family. + +@item contention scope +specifies the scheduling contention scope. RTEMS only supports the +PTHREAD_SCOPE_PROCESS scheduling contention scope. + +@item scheduling inheritance +specifies whether a user specified or the scheduling policy and +parameters of the currently executing thread are to be used. When +this is PTHREAD_INHERIT_SCHED, then the scheduling policy and +parameters of the currently executing thread are inherited by +the newly created thread. + +@item scheduling policy and parameters +specify the manner in which the thread will contend for the processor. +The scheduling parameters are interpreted based on the specified policy. +All policies utilize the thread priority parameter. + +@end table + +@ifinfo +@node Thread Manager Operations, Thread Manager Directives, Thread Attributes, Thread Manager +@end ifinfo +@section Operations + +@ifinfo +@node Thread Manager Directives, pthread_attr_init, Thread Manager Operations, Thread Manager +@end ifinfo +@section Directives +@ifinfo +@menu +* pthread_attr_init:: +* pthread_attr_destroy:: +* pthread_attr_setdetachstate:: +* pthread_attr_getdetachstate:: +* pthread_attr_setstacksize:: +* pthread_attr_getstacksize:: +* pthread_attr_setstackaddr:: +* pthread_attr_getstackaddr:: +* pthread_attr_setscope:: +* pthread_attr_getscope:: +* pthread_attr_setinheritsched:: +* pthread_attr_getinheritsched:: +* pthread_attr_setschedpolicy:: +* pthread_attr_getschedpolicy:: +* pthread_attr_setschedparam:: +* pthread_attr_getschedparam:: +* pthread_create:: +* pthread_exit:: +* pthread_detach:: +* pthread_join:: +* pthread_self:: +* pthread_equal:: +* pthread_once:: +* pthread_setschedparam:: +* pthread_getschedparam:: +@end menu +@end ifinfo + +This section details the thread manager's directives. +A subsection is dedicated to each of this manager's directives +and describes the calling sequence, related constants, usage, +and status codes. + +@page +@ifinfo +@node pthread_attr_init, pthread_attr_destroy, Thread Manager Directives, Thread Manager Directives +@end ifinfo +@subsection pthread_attr_init + +@subheading CALLING SEQUENCE: + + +@example +#include + +int pthread_attr_init( + pthread_attr_t *attr +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +The attribute pointer argument is invalid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_attr_destroy, pthread_attr_setdetachstate, pthread_attr_init, Thread Manager Directives +@end ifinfo +@subsection pthread_attr_destroy + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_attr_destroy( + pthread_attr_t *attr +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +The attribute pointer argument is invalid. + +@item EINVAL +The attribute set is not initialized. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_attr_setdetachstate, pthread_attr_getdetachstate, pthread_attr_destroy, Thread Manager Directives +@end ifinfo +@subsection pthread_attr_setdetachstate + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_attr_setdetachstate( + pthread_attr_t *attr, + int detachstate +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +The attribute pointer argument is invalid. + +@item EINVAL +The attribute set is not initialized. + +@item EINVAL +The detachstate argument is invalid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_attr_getdetachstate, pthread_attr_setstacksize, pthread_attr_setdetachstate, Thread Manager Directives +@end ifinfo +@subsection pthread_attr_getdetachstate + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_attr_getdetachstate( + const pthread_attr_t *attr, + int *detachstate +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +The attribute pointer argument is invalid. + +@item EINVAL +The attribute set is not initialized. + +@item EINVAL +The detatchstate pointer argument is invalid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_attr_setstacksize, pthread_attr_getstacksize, pthread_attr_getdetachstate, Thread Manager Directives +@end ifinfo +@subsection pthread_attr_setstacksize + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_attr_setstacksize( + pthread_attr_t *attr, + size_t stacksize +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +The attribute pointer argument is invalid. + +@item EINVAL +The attribute set is not initialized. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +If the specified stacksize is below the minimum required for this CPU, then +the stacksize will be set to the minimum for this CPU. + +@page +@ifinfo +@node pthread_attr_getstacksize, pthread_attr_setstackaddr, pthread_attr_setstacksize, Thread Manager Directives +@end ifinfo +@subsection pthread_attr_getstacksize + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_attr_getstacksize( + const pthread_attr_t *attr, + size_t *stacksize +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +The attribute pointer argument is invalid. + +@item EINVAL +The attribute set is not initialized. + +@item EINVAL +The stacksize pointer argument is invalid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_attr_setstackaddr, pthread_attr_getstackaddr, pthread_attr_getstacksize, Thread Manager Directives +@end ifinfo +@subsection pthread_attr_setstackaddr + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_attr_setstackaddr( + pthread_attr_t *attr, + void *stackaddr +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +The attribute pointer argument is invalid. + +@item EINVAL +The attribute set is not initialized. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_attr_getstackaddr, pthread_attr_setscope, pthread_attr_setstackaddr, Thread Manager Directives +@end ifinfo +@subsection pthread_attr_getstackaddr + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_attr_getstackaddr( + const pthread_attr_t *attr, + void **stackaddr +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +The attribute pointer argument is invalid. + +@item EINVAL +The attribute set is not initialized. + +@item EINVAL +The stackaddr pointer argument is invalid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_attr_setscope, pthread_attr_getscope, pthread_attr_getstackaddr, Thread Manager Directives +@end ifinfo +@subsection pthread_attr_setscope + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_attr_setscope( + pthread_attr_t *attr, + int contentionscope +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +The attribute pointer argument is invalid. + +@item EINVAL +The attribute set is not initialized. + +@item EINVAL +The contention scope specified is not valid. + +@item ENOTSUP +The contention scope specified (PTHREAD_SCOPE_SYSTEM) is not supported. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_attr_getscope, pthread_attr_setinheritsched, pthread_attr_setscope, Thread Manager Directives +@end ifinfo +@subsection pthread_attr_getscope + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_attr_getscope( + const pthread_attr_t *attr, + int *contentionscope +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +The attribute pointer argument is invalid. + +@item EINVAL +The attribute set is not initialized. + +@item EINVAL +The contentionscope pointer argument is invalid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_attr_setinheritsched, pthread_attr_getinheritsched, pthread_attr_getscope, Thread Manager Directives +@end ifinfo +@subsection pthread_attr_setinheritsched + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_attr_setinheritsched( + pthread_attr_t *attr, + int inheritsched +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +The attribute pointer argument is invalid. + +@item EINVAL +The attribute set is not initialized. + +@item EINVAL +The specified scheduler inheritance argument is invalid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_attr_getinheritsched, pthread_attr_setschedpolicy, pthread_attr_setinheritsched, Thread Manager Directives +@end ifinfo +@subsection pthread_attr_getinheritsched + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_attr_getinheritsched( + const pthread_attr_t *attr, + int *inheritsched +); +@end example + +@subheading STATUS CODES: +@table @b +@item EINVAL +The attribute pointer argument is invalid. + +@item EINVAL +The attribute set is not initialized. + +@item EINVAL +The inheritsched pointer argument is invalid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_attr_setschedpolicy, pthread_attr_getschedpolicy, pthread_attr_getinheritsched, Thread Manager Directives +@end ifinfo +@subsection pthread_attr_setschedpolicy + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_attr_setschedpolicy( + pthread_attr_t *attr, + int policy +); +@end example + +@subheading STATUS CODES: +@table @b +@item EINVAL +The attribute pointer argument is invalid. + +@item EINVAL +The attribute set is not initialized. + +@item ENOTSUP +The specified scheduler policy argument is invalid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_attr_getschedpolicy, pthread_attr_setschedparam, pthread_attr_setschedpolicy, Thread Manager Directives +@end ifinfo +@subsection pthread_attr_getschedpolicy + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_attr_getschedpolicy( + const pthread_attr_t *attr, + int *policy +); +@end example + +@subheading STATUS CODES: +@table @b +@item EINVAL +The attribute pointer argument is invalid. + +@item EINVAL +The attribute set is not initialized. + +@item EINVAL +The specified scheduler policy argument pointer is invalid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_attr_setschedparam, pthread_attr_getschedparam, pthread_attr_getschedpolicy, Thread Manager Directives +@end ifinfo +@subsection pthread_attr_setschedparam + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_attr_setschedparam( + pthread_attr_t *attr, + const struct sched_param param +); +@end example + +@subheading STATUS CODES: +@table @b +@item EINVAL +The attribute pointer argument is invalid. + +@item EINVAL +The attribute set is not initialized. + +@item EINVAL +The specified scheduler parameter argument is invalid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_attr_getschedparam, pthread_create, pthread_attr_setschedparam, Thread Manager Directives +@end ifinfo +@subsection pthread_attr_getschedparam + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_attr_getschedparam( + const pthread_attr_t *attr, + struct sched_param *param +); +@end example + +@subheading STATUS CODES: +@table @b +@item EINVAL +The attribute pointer argument is invalid. + +@item EINVAL +The attribute set is not initialized. + +@item EINVAL +The specified scheduler parameter argument pointer is invalid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_create, pthread_exit, pthread_attr_getschedparam, Thread Manager Directives +@end ifinfo +@subsection pthread_create + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_create( + pthread_t *thread, + const pthread_attr_t *attr, + void (*start_routine)( void * ), + void *arg +); +@end example + +@subheading STATUS CODES: + +@table @b + +@item EINVAL +The attribute set is not initialized. + +@item EINVAL +The user specified a stack address and the size of the area was not +large enough to meet this processor's minimum stack requirements. + +@item EINVAL +The specified scheduler inheritance policy was invalid. + +@item ENOTSUP +The specified contention scope was PTHREAD_SCOPE_PROCESS. + +@item EINVAL +The specified thread priority was invalid. + +@item EINVAL +The specified scheduling policy was invalid. + +@item EINVAL +The scheduling policy was SCHED_SPORADIC and the specified replenishment +period is less than the initial budget. + +@item EINVAL +The scheduling policy was SCHED_SPORADIC and the specified low priority +is invalid. + +@item EAGAIN +The system lacked the necessary resources to create another thread, or the +self imposed limit on the total number of threads in a process +PTHREAD_THREAD_MAX would be exceeded. + +@item EINVAL +Invalid argument passed. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_exit, pthread_detach, pthread_create, Thread Manager Directives +@end ifinfo +@subsection pthread_exit + +@subheading CALLING SEQUENCE: + +@example +#include + +void pthread_exit( + void *status +); +@end example + +@subheading STATUS CODES: +@table @b +@item NONE + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_detach, pthread_join, pthread_exit, Thread Manager Directives +@end ifinfo +@subsection pthread_detach + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_detach( + pthread_t thread +); +@end example + +@subheading STATUS CODES: +@table @b +@item ESRCH +The thread specified is invalid. + +@item EINVAL +The thread specified is not a joinable thread. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +If any threads have previously joined with the specified thread, then they +will remain joined with that thread. Any subsequent calls to pthread_join +on the specified thread will fail. + +@page +@ifinfo +@node pthread_join, pthread_self, pthread_detach, Thread Manager Directives +@end ifinfo +@subsection pthread_join + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_join( + pthread_t thread, + void **value_ptr +); +@end example + +@subheading STATUS CODES: +@table @b +@item ESRCH +The thread specified is invalid. + +@item EINVAL +The thread specified is not a joinable thread. + +@item EDEADLK +A deadlock was detected or thread is the calling thread. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +If any threads have previously joined with the specified thread, then they +will remain joined with that thread. Any subsequent calls to pthread_join +on the specified thread will fail. + +If value_ptr is NULL, then no value is returned. + +@page +@ifinfo +@node pthread_self, pthread_equal, pthread_join, Thread Manager Directives +@end ifinfo +@subsection pthread_self + +@subheading CALLING SEQUENCE: + +@example +#include + +pthread_t pthread_self( void ); +@end example + +@subheading STATUS CODES: + +This routine returns the id of the calling thread. + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_equal, pthread_once, pthread_self, Thread Manager Directives +@end ifinfo +@subsection pthread_equal + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_equal( + pthread_t t1, + pthread_t t2 +); +@end example + +@subheading STATUS CODES: + +@table @b +@item zero +The thread ids are not equal. + +@item non-zero +The thread ids are equal. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +The behavior is undefined if the thread IDs are not valid. + +@page +@ifinfo +@node pthread_once, pthread_setschedparam, pthread_equal, Thread Manager Directives +@end ifinfo +@subsection pthread_once + +@subheading CALLING SEQUENCE: + +@example +#include + +pthread_once_t once_control = PTHREAD_ONCE_INIT; + +int pthread_once( + pthread_once_t *once_control, + void (*init_routine)(void) +); +@end example + +@subheading STATUS CODES: + +NONE + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_setschedparam, pthread_getschedparam, pthread_once, Thread Manager Directives +@end ifinfo +@subsection pthread_setschedparam + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_setschedparam( + pthread_t thread, + int policy, + struct sched_param *param +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +The scheduling parameters indicated by the parameter param is invalid. + +@item EINVAL +The value specified by policy is invalid. + +@item EINVAL +The scheduling policy was SCHED_SPORADIC and the specified replenishment +period is less than the initial budget. + +@item EINVAL +The scheduling policy was SCHED_SPORADIC and the specified low priority +is invalid. + +@item ESRCH +The thread indicated was invalid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + +@page +@ifinfo +@node pthread_getschedparam, Signal Manager, pthread_setschedparam, Thread Manager Directives +@end ifinfo +@subsection pthread_getschedparam + +@subheading CALLING SEQUENCE: + +@example +#include + +int pthread_getschedparam( + pthread_t thread, + int *policy, + struct sched_param *param +); +@end example + +@subheading STATUS CODES: + +@table @b +@item EINVAL +The policy pointer argument is invalid. + +@item EINVAL +The scheduling parameters pointer argument is invalid. + +@item ESRCH +The thread indicated by the parameter thread is invalid. + +@end table + +@subheading DESCRIPTION: + +@subheading NOTES: + -- cgit v1.2.3