forked from Imagelibrary/rtems
Initial revision
This commit is contained in:
59
doc/new_chapters/Makefile
Normal file
59
doc/new_chapters/Makefile
Normal file
@@ -0,0 +1,59 @@
|
||||
#
|
||||
# COPYRIGHT (c) 1996.
|
||||
# On-Line Applications Research Corporation (OAR).
|
||||
# All rights reserved.
|
||||
#
|
||||
|
||||
include ../Make.config
|
||||
|
||||
PROJECT=posix
|
||||
DOCNAME=posix_test_plan
|
||||
|
||||
all:
|
||||
|
||||
COMMON_FILES=../common/cpright.texi
|
||||
FILES= clock.texi cond.texi key.texi mutex.texi $(DOCNAME).texi preface.texi \
|
||||
sched.texi signal.texi thread.texi $(COMMON_FILES)
|
||||
|
||||
all:
|
||||
|
||||
INFOFILES=$(wildcard $(PROJECT) $(PROJECT)-*)
|
||||
|
||||
info: $(DOCNAME)
|
||||
# cp $(DOCNAME) $(DOCNAME)-* $(INFO_INSTALL)
|
||||
cp $(DOCNAME) $(INFO_INSTALL)
|
||||
|
||||
posix_test_plan: $(FILES)
|
||||
$(MAKEINFO) $(DOCNAME).texi
|
||||
|
||||
vinfo: info
|
||||
$(INFO) -f ./$(DOCNAME)
|
||||
|
||||
dvi: $(DOCNAME).dvi
|
||||
ps: $(DOCNAME).ps
|
||||
|
||||
$(DOCNAME).ps: $(DOCNAME).dvi
|
||||
dvips -o $(DOCNAME).ps $(DOCNAME).dvi
|
||||
cp $(PROJECT).ps $(PS_INSTALL)
|
||||
|
||||
dv: dvi
|
||||
$(XDVI) $(DOCNAME).dvi
|
||||
|
||||
view: ps
|
||||
$(GHOSTVIEW) $(DOCNAME).ps
|
||||
|
||||
$(DOCNAME).dvi: $(FILES)
|
||||
$(TEXI2DVI) $(DOCNAME).texi
|
||||
|
||||
html:
|
||||
-mkdir $(WWW_INSTALL)/$(DOCNAME)
|
||||
$(TEXI2WWW) $(TEXI2WWW_ARGS) -dir $(WWW_INSTALL)/c_$(PROJECT) \
|
||||
$(PROJECT).texi
|
||||
cp ../rtems.html $(WWW_INSTALL)
|
||||
|
||||
|
||||
clean:
|
||||
rm -f *.o $(PROG) *.txt core *.html
|
||||
rm -f *.dvi *.ps *.log *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr $(BASE)
|
||||
rm -f $(DOCNAME) $(DOCNAME)-* _*
|
||||
|
||||
96
doc/new_chapters/base.texi
Normal file
96
doc/new_chapters/base.texi
Normal file
@@ -0,0 +1,96 @@
|
||||
@c
|
||||
@c COPYRIGHT (c) 1996.
|
||||
@c On-Line Applications Research Corporation (OAR).
|
||||
@c All rights reserved.
|
||||
@c
|
||||
|
||||
@ifinfo
|
||||
@node Mutex Manager, Mutex Manager Introduction, Preface, 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{sigaddset} -
|
||||
@item @code{sigdelset} -
|
||||
@item @code{sigfillset} -
|
||||
@item @code{sigismember} -
|
||||
@item @code{sigemptyset} -
|
||||
@item @code{sigaction} -
|
||||
@item @code{pthread_kill} -
|
||||
@item @code{pthread_sigmask} -
|
||||
@item @code{kill} -
|
||||
@item @code{sigwait} -
|
||||
@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, sigaddset, Mutex Manager Operations, Mutex Manager
|
||||
@end ifinfo
|
||||
@section Directives
|
||||
@ifinfo
|
||||
@menu
|
||||
* sigaddset::
|
||||
* sigdelset::
|
||||
* sigfillset::
|
||||
* sigismember::
|
||||
* sigemptyset::
|
||||
* sigaction::
|
||||
* pthread_kill::
|
||||
* pthread_sigmask::
|
||||
* kill::
|
||||
* sigwait::
|
||||
@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 sigaddset, sigdelset, Mutex Manager Directives, Mutex Manager Directives
|
||||
@end ifinfo
|
||||
@subsection sigaddset
|
||||
|
||||
@subheading CALLING SEQUENCE:
|
||||
|
||||
@example
|
||||
int sigaddset(
|
||||
sigset_t *set,
|
||||
int signo
|
||||
);
|
||||
@end example
|
||||
|
||||
@subheading STATUS CODES:
|
||||
|
||||
@subheading DESCRIPTION:
|
||||
|
||||
@subheading NOTES:
|
||||
|
||||
262
doc/new_chapters/clock.texi
Normal file
262
doc/new_chapters/clock.texi
Normal file
@@ -0,0 +1,262 @@
|
||||
@c
|
||||
@c COPYRIGHT (c) 1996.
|
||||
@c On-Line Applications Research Corporation (OAR).
|
||||
@c All rights reserved.
|
||||
@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 <time.h>
|
||||
|
||||
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 <time.h>
|
||||
|
||||
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 <time.h>
|
||||
|
||||
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 <time.h>
|
||||
|
||||
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 <time.h>
|
||||
|
||||
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 time SEQUENCE:
|
||||
|
||||
@example
|
||||
#include <time.h>
|
||||
|
||||
int time(
|
||||
time_t *tloc
|
||||
);
|
||||
@end example
|
||||
|
||||
@subheading STATUS CODES:
|
||||
|
||||
This routine returns the number of seconds since the Epoch.
|
||||
|
||||
@subheading DESCRIPTION:
|
||||
|
||||
@subheading NOTES:
|
||||
|
||||
384
doc/new_chapters/cond.texi
Normal file
384
doc/new_chapters/cond.texi
Normal file
@@ -0,0 +1,384 @@
|
||||
@c
|
||||
@c COPYRIGHT (c) 1996.
|
||||
@c On-Line Applications Research Corporation (OAR).
|
||||
@c All rights reserved.
|
||||
@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 <pthread.h>
|
||||
|
||||
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 <pthread.h>
|
||||
|
||||
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 <pthread.h>
|
||||
|
||||
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 <pthread.h>
|
||||
|
||||
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 <pthread.h>
|
||||
|
||||
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 <pthread.h>
|
||||
|
||||
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 <pthread.h>
|
||||
|
||||
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 <pthread.h>
|
||||
|
||||
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 <pthread.h>
|
||||
|
||||
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 <pthread.h>
|
||||
|
||||
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:
|
||||
|
||||
177
doc/new_chapters/key.texi
Normal file
177
doc/new_chapters/key.texi
Normal file
@@ -0,0 +1,177 @@
|
||||
@c
|
||||
@c COPYRIGHT (c) 1996.
|
||||
@c On-Line Applications Research Corporation (OAR).
|
||||
@c All rights reserved.
|
||||
@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 <pthread.h>
|
||||
|
||||
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 <pthread.h>
|
||||
|
||||
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 <pthread.h>
|
||||
|
||||
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 <pthread.h>
|
||||
|
||||
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:
|
||||
|
||||
640
doc/new_chapters/mutex.texi
Normal file
640
doc/new_chapters/mutex.texi
Normal file
@@ -0,0 +1,640 @@
|
||||
@c
|
||||
@c COPYRIGHT (c) 1996.
|
||||
@c On-Line Applications Research Corporation (OAR).
|
||||
@c All rights reserved.
|
||||
@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 <pthread.h>
|
||||
|
||||
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 <pthread.h>
|
||||
|
||||
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 <pthread.h>
|
||||
|
||||
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 <pthread.h>
|
||||
|
||||
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 <pthread.h>
|
||||
|
||||
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 <pthread.h>
|
||||
|
||||
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 <pthread.h>
|
||||
|
||||
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 <pthread.h>
|
||||
|
||||
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 <pthread.h>
|
||||
|
||||
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 <pthread.h>
|
||||
|
||||
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 <pthread.h>
|
||||
|
||||
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 <pthread.h>
|
||||
|
||||
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 <pthread.h>
|
||||
#include <time.h>
|
||||
|
||||
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 <pthread.h>
|
||||
|
||||
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 <pthread.h>
|
||||
|
||||
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 <pthread.h>
|
||||
|
||||
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:
|
||||
|
||||
123
doc/new_chapters/posix_test_plan.texi
Normal file
123
doc/new_chapters/posix_test_plan.texi
Normal file
@@ -0,0 +1,123 @@
|
||||
\input ../texinfo/texinfo @c -*-texinfo-*-
|
||||
@c %**start of header
|
||||
@setfilename posix_test_plan
|
||||
@syncodeindex vr fn
|
||||
@synindex ky cp
|
||||
@paragraphindent 0
|
||||
@c @smallbook
|
||||
@c %**end of header
|
||||
|
||||
@c
|
||||
@c COPYRIGHT (c) 1988-1996.
|
||||
@c On-Line Applications Research Corporation (OAR).
|
||||
@c All rights reserved.
|
||||
@c
|
||||
|
||||
@c
|
||||
@c Master file for the C User's Guide
|
||||
@c
|
||||
|
||||
@c Joel's Questions
|
||||
@c
|
||||
@c 1. Why does paragraphindent only impact makeinfo?
|
||||
@c 2. Why does paragraphindent show up in HTML?
|
||||
@c
|
||||
|
||||
@include ../common/setup.texi
|
||||
|
||||
@ignore
|
||||
@ifinfo
|
||||
@format
|
||||
START-INFO-DIR-ENTRY
|
||||
* RTEMS Posix Test Plan: (posix_test_plan). Posix Test Plan
|
||||
END-INFO-DIR-ENTRY
|
||||
@end format
|
||||
@end ifinfo
|
||||
@end ignore
|
||||
|
||||
@c variable substitution info:
|
||||
@c
|
||||
@c @set RTEMS-LANGUAGE C
|
||||
@c the language is @value{RTEMS-LANGUAGE}
|
||||
@c NOTE: don't use underscore in the name
|
||||
@c
|
||||
|
||||
@c
|
||||
@c Title Page Stuff
|
||||
@c
|
||||
|
||||
@set edition 4.0.0a
|
||||
@set update-date 25 April 1997
|
||||
@set update-month April 1997
|
||||
|
||||
@c
|
||||
@c I don't really like having a short title page. --joel
|
||||
@c
|
||||
@c @shorttitlepage RTEMS POSIX API Test Plan
|
||||
|
||||
@setchapternewpage odd
|
||||
@settitle RTEMS POSIX API Test Plan
|
||||
@titlepage
|
||||
@finalout
|
||||
|
||||
@title RTEMS POSIX API Test Plan
|
||||
@subtitle Edition @value{edition}, for RTEMS 4.0.0
|
||||
@sp 1
|
||||
@subtitle @value{update-month}
|
||||
@author On-Line Applications Research Corporation
|
||||
@page
|
||||
@include ../common/cpright.texi
|
||||
@end titlepage
|
||||
|
||||
@c This prevents a black box from being printed on "overflow" lines.
|
||||
@c The alternative is to rework a sentence to avoid this problem.
|
||||
|
||||
@include preface.texi
|
||||
@include thread.texi
|
||||
@include signal.texi
|
||||
@include mutex.texi
|
||||
@include cond.texi
|
||||
@include key.texi
|
||||
@include clock.texi
|
||||
@include sched.texi
|
||||
@ifinfo
|
||||
@node Top, Preface, (dir), (dir)
|
||||
@top posix_test_plan
|
||||
|
||||
This is the online version of the RTEMS POSIX API Test Plan.
|
||||
|
||||
@menu
|
||||
* Preface::
|
||||
* Thread Manager::
|
||||
* Signal Manager::
|
||||
* Mutex Manager::
|
||||
* Condition Variable Manager::
|
||||
* Key Manager::
|
||||
* Clock Manager::
|
||||
* Scheduler Manager::
|
||||
* Command and Variable Index::
|
||||
* Concept Index::
|
||||
@end menu
|
||||
|
||||
@end ifinfo
|
||||
@c
|
||||
@c
|
||||
@c Need to copy the emacs stuff and "trailer stuff" (index, toc) into here
|
||||
@c
|
||||
|
||||
@node Command and Variable Index, Concept Index, sched_yield, Top
|
||||
@unnumbered Command and Variable Index
|
||||
|
||||
There are currently no Command and Variable Index entries.
|
||||
|
||||
@c @printindex fn
|
||||
|
||||
@node Concept Index, , Command and Variable Index, Top
|
||||
@unnumbered Concept Index
|
||||
|
||||
There are currently no Concept Index entries.
|
||||
@c @printindex cp
|
||||
|
||||
@contents
|
||||
@bye
|
||||
|
||||
12
doc/new_chapters/preface.texi
Normal file
12
doc/new_chapters/preface.texi
Normal file
@@ -0,0 +1,12 @@
|
||||
@c
|
||||
@c COPYRIGHT (c) 1996.
|
||||
@c On-Line Applications Research Corporation (OAR).
|
||||
@c All rights reserved.
|
||||
@c
|
||||
|
||||
@ifinfo
|
||||
@node Preface, Thread Manager, Top, Top
|
||||
@end ifinfo
|
||||
@unnumbered Preface
|
||||
|
||||
This is the test plan document for the POSIX API support for RTEMS.
|
||||
226
doc/new_chapters/sched.texi
Normal file
226
doc/new_chapters/sched.texi
Normal file
@@ -0,0 +1,226 @@
|
||||
@c
|
||||
@c COPYRIGHT (c) 1996.
|
||||
@c On-Line Applications Research Corporation (OAR).
|
||||
@c All rights reserved.
|
||||
@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 <sched.h>
|
||||
|
||||
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 <sched.h>
|
||||
|
||||
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 <sched.h>
|
||||
|
||||
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 <sched.h>
|
||||
|
||||
int sched_yield( void );
|
||||
@end example
|
||||
|
||||
@subheading STATUS CODES:
|
||||
|
||||
This routine always returns zero to indicate success.
|
||||
|
||||
@subheading DESCRIPTION:
|
||||
|
||||
@subheading NOTES:
|
||||
|
||||
689
doc/new_chapters/signal.texi
Normal file
689
doc/new_chapters/signal.texi
Normal file
@@ -0,0 +1,689 @@
|
||||
@c
|
||||
@c COPYRIGHT (c) 1996.
|
||||
@c On-Line Applications Research Corporation (OAR).
|
||||
@c All rights reserved.
|
||||
@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 <signal.h>
|
||||
|
||||
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 <signal.h>
|
||||
|
||||
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 <signal.h>
|
||||
|
||||
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 <signal.h>
|
||||
|
||||
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 <signal.h>
|
||||
|
||||
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 <signal.h>
|
||||
|
||||
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 <signal.h>
|
||||
|
||||
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 <signal.h>
|
||||
|
||||
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 <signal.h>
|
||||
|
||||
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 <sys/types.h>
|
||||
#include <signal.h>
|
||||
|
||||
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 <signal.h>
|
||||
|
||||
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 <signal.h>
|
||||
|
||||
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 <signal.h>
|
||||
|
||||
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 <signal.h>
|
||||
|
||||
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 <signal.h>
|
||||
|
||||
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 <signal.h>
|
||||
|
||||
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 <signal.h>
|
||||
|
||||
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 <signal.h>
|
||||
|
||||
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:
|
||||
|
||||
|
||||
1023
doc/new_chapters/thread.texi
Normal file
1023
doc/new_chapters/thread.texi
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user