summaryrefslogtreecommitdiffstats
path: root/doc/posix_users
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-10-11 21:24:38 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-10-11 21:24:38 +0000
commit7479042a5914a6b9223e734b4a14652314661e1a (patch)
treee673fe698aa58bb0e4c6be0bd468ced47207594a /doc/posix_users
parentAdded descriptions. (diff)
downloadrtems-7479042a5914a6b9223e734b4a14652314661e1a.tar.bz2
Generated concept and function index entries.
Diffstat (limited to 'doc/posix_users')
-rw-r--r--doc/posix_users/cancel.t46
-rw-r--r--doc/posix_users/clock.t145
-rw-r--r--doc/posix_users/cond.t126
-rw-r--r--doc/posix_users/cspecific.t142
-rw-r--r--doc/posix_users/device.t162
-rw-r--r--doc/posix_users/files.t644
-rw-r--r--doc/posix_users/io.t342
-rw-r--r--doc/posix_users/key.t44
-rw-r--r--doc/posix_users/memorymgmt.t70
-rw-r--r--doc/posix_users/message.t364
-rw-r--r--doc/posix_users/mutex.t292
-rw-r--r--doc/posix_users/posix_users.texi8
-rw-r--r--doc/posix_users/procenv.t148
-rw-r--r--doc/posix_users/process.t132
-rw-r--r--doc/posix_users/sched.t66
-rw-r--r--doc/posix_users/semaphores.t236
-rw-r--r--doc/posix_users/signal.t338
-rw-r--r--doc/posix_users/systemdb.t60
-rw-r--r--doc/posix_users/thread.t432
19 files changed, 2626 insertions, 1171 deletions
diff --git a/doc/posix_users/cancel.t b/doc/posix_users/cancel.t
index daf0da4a46..604bf43439 100644
--- a/doc/posix_users/cancel.t
+++ b/doc/posix_users/cancel.t
@@ -1,16 +1,16 @@
@c
-@c COPYRIGHT (c) 1988-1998.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
+@c COPYRIGHT (c) 1988-1998.
+@c On-Line Applications Research Corporation (OAR).
+@c All rights reserved.
@c
-@c $Id$
+@c $Id$
@c
@chapter Thread Cancellation Manager
@section Introduction
-The
+The
thread cancellation manager is ...
The directives provided by the thread cancellation manager are:
@@ -39,9 +39,15 @@ A subsection is dedicated to each of this manager's directives
and describes the calling sequence, related constants, usage,
and status codes.
+@c
+@c
+@c
@page
@subsection pthread_cancel - Cancel Execution of a Thread
+@findex pthread_cancel
+@cindex cancel execution of a thread
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -66,9 +72,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection pthread_setcancelstate - Set Cancelability State
+@findex pthread_setcancelstate
+@cindex set cancelability state
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -93,9 +105,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection pthread_setcanceltype - Set Cancelability Type
+@findex pthread_setcanceltype
+@cindex set cancelability type
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -120,9 +138,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection pthread_testcancel - Create Cancellation Point
+@findex pthread_testcancel
+@cindex create cancellation point
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -147,9 +171,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection pthread_cleanup_push - Establish Cancellation Handler
+@findex pthread_cleanup_push
+@cindex establish cancellation handler
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -174,9 +204,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection pthread_cleanup_pop - Remove Cancellation Handler
+@findex pthread_cleanup_pop
+@cindex remove cancellation handler
+
@subheading CALLING SEQUENCE:
@ifset is-C
diff --git a/doc/posix_users/clock.t b/doc/posix_users/clock.t
index ebaec535be..086eacf461 100644
--- a/doc/posix_users/clock.t
+++ b/doc/posix_users/clock.t
@@ -1,9 +1,9 @@
@c
-@c COPYRIGHT (c) 1988-1998.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
+@c COPYRIGHT (c) 1988-1998.
+@c On-Line Applications Research Corporation (OAR).
+@c All rights reserved.
@c
-@c $Id$
+@c $Id$
@c
@chapter Clock Manager
@@ -41,13 +41,16 @@ and status codes.
@subsection clock_gettime -Obtain Time of Day
+@findex clock_gettime
+@cindex obtain time of day
+
@subheading CALLING SEQUENCE:
@example
#include <time.h>
int clock_gettime(
- clockid_t clock_id,
+ clockid_t clock_id,
struct timespec *tp
);
@end example
@@ -58,10 +61,10 @@ On error, this routine returns -1 and sets errno to one of the following:
@table @b
@item EINVAL
-The tp pointer parameter is invalid.
+The tp pointer parameter is invalid.
@item EINVAL
-The clock_id specified is invalid.
+The clock_id specified is invalid.
@end table
@subheading DESCRIPTION:
@@ -70,27 +73,33 @@ The clock_id specified is invalid.
NONE
+@c
+@c
+@c
@page
@subsection clock_settime - Set Time of Day
-
+
+@findex clock_settime
+@cindex set time of day
+
@subheading CALLING SEQUENCE:
-
+
@example
#include <time.h>
-
+
int clock_settime(
- clockid_t clock_id,
+ 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.
+The tp pointer parameter is invalid.
@item EINVAL
The clock_id specified is invalid.
@@ -99,86 +108,104 @@ The clock_id specified is invalid.
The contents of the tp structure are invalid.
@end table
-
+
@subheading DESCRIPTION:
-
+
@subheading NOTES:
NONE
-
+
+@c
+@c
+@c
@page
@subsection clock_getres - Get Clock Resolution
-
+
+@findex clock_getres
+@cindex get clock resolution
+
@subheading CALLING SEQUENCE:
-
+
@example
#include <time.h>
-
+
int clock_getres(
- clockid_t clock_id,
+ 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.
+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.
+@c
+@c
+@c
@page
@subsection sleep - Delay Process Execution
-
+
+@findex sleep
+@cindex delay process execution
+
@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:
-
+
The @code{sleep()} function delays the calling thread by the specified
number of @code{seconds}.
@subheading NOTES:
This call is interruptible by a signal.
-
+
+@c
+@c
+@c
@page
@subsection nanosleep - Delay with High Resolution
-
+
+@findex nanosleep
+@cindex delay with high resolution
+
@subheading CALLING SEQUENCE:
-
+
@example
#include <time.h>
-
+
int nanosleep(
const struct timespec *rqtp,
- struct timespec *rmtp
+ struct timespec *rmtp
);
@end example
-
+
@subheading STATUS CODES:
On error, this routine returns -1 and sets errno to one of the following:
@@ -195,16 +222,22 @@ 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.
+@c
+@c
+@c
@page
@subsection gettimeofday - Get the Time of Day
+@findex gettimeofday
+@cindex get the time of day
+
@subheading CALLING SEQUENCE:
@example
@@ -212,7 +245,7 @@ This call is interruptible by a signal.
#include <unistd.h>
int gettimeofday(
- struct timeval *tp,
+ struct timeval *tp,
struct timezone *tzp
);
@end example
@@ -229,7 +262,7 @@ On error, this routine returns -1 and sets @code{errno} as appropriate.
Timezone (or something else) is invalid.
@item EFAULT
-One of @code{tv} or @code{tz} pointed outside your accessible address
+One of @code{tv} or @code{tz} pointed outside your accessible address
space
@end table
@@ -240,35 +273,41 @@ This routine returns the current time of day in the @code{tp} structure.
@subheading NOTES:
-Currently, the timezone information is not supported. The @code{tzp}
+Currently, the timezone information is not supported. The @code{tzp}
argument is ignored.
+@c
+@c
+@c
@page
@subsection time - Get time in seconds
-
+
+@findex time
+@cindex get time in seconds
+
@subheading CALLING SEQUENCE:
-
+
@example
#include <time.h>
-
+
int time(
- time_t *tloc
+ time_t *tloc
);
@end example
-
+
@subheading STATUS CODES:
This routine returns the number of seconds since the Epoch.
@subheading DESCRIPTION:
-@code{time} returns the time since 00:00:00 GMT, January 1, 1970,
+@code{time} returns the time since 00:00:00 GMT, January 1, 1970,
measured in seconds
-If @code{tloc} in non null, the return value is also stored in the
+If @code{tloc} in non null, the return value is also stored in the
memory pointed to by @code{t}.
-
+
@subheading NOTES:
NONE
-
+
diff --git a/doc/posix_users/cond.t b/doc/posix_users/cond.t
index 52a201a54a..95e30376b2 100644
--- a/doc/posix_users/cond.t
+++ b/doc/posix_users/cond.t
@@ -1,9 +1,9 @@
@c
-@c COPYRIGHT (c) 1988-1998.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
+@c COPYRIGHT (c) 1988-1998.
+@c On-Line Applications Research Corporation (OAR).
+@c All rights reserved.
@c
-@c $Id$
+@c $Id$
@c
@chapter Condition Variable Manager
@@ -42,16 +42,22 @@ A subsection is dedicated to each of this manager's directives
and describes the calling sequence, related constants, usage,
and status codes.
+@c
+@c
+@c
@page
@subsection pthread_condattr_init - Initialize a Condition Variable Attribute Set
+@findex pthread_condattr_init
+@cindex initialize a condition variable attribute set
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_condattr_init(
- pthread_condattr_t *attr
+pthread_condattr_t *attr
);
@end example
@@ -67,16 +73,22 @@ attributes object.
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection pthread_condattr_destroy - Destroy a Condition Variable Attribute Set
+@findex pthread_condattr_destroy
+@cindex destroy a condition variable attribute set
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_condattr_destroy(
- pthread_condattr_t *attr
+pthread_condattr_t *attr
);
@end example
@@ -91,52 +103,64 @@ The attribute object specified is invalid.
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection pthread_condattr_setpshared - Set Process Shared Attribute
+@findex pthread_condattr_setpshared
+@cindex set process shared attribute
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_condattr_setpshared(
- pthread_condattr_t *attr,
- int pshared
+pthread_condattr_t *attr,
+int pshared
);
@end example
@subheading STATUS CODES:
-
+
@table @b
@item EINVAL
Invalid argument passed.
-
+
@end table
@subheading DESCRIPTION:
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection pthread_condattr_getpshared - Get Process Shared Attribute
+@findex pthread_condattr_getpshared
+@cindex get process shared attribute
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_condattr_getpshared(
- const pthread_condattr_t *attr,
- int *pshared
+const pthread_condattr_t *attr,
+int *pshared
);
@end example
@subheading STATUS CODES:
-
+
@table @b
@item EINVAL
Invalid argument passed.
-
+
@end table
@subheading DESCRIPTION:
@@ -144,17 +168,23 @@ Invalid argument passed.
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection pthread_cond_init - Initialize a Condition Variable
+@findex pthread_cond_init
+@cindex initialize a condition variable
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_cond_init(
- pthread_cond_t *cond,
- const pthread_condattr_t *attr
+pthread_cond_t *cond,
+const pthread_condattr_t *attr
);
@end example
@@ -162,7 +192,7 @@ int pthread_cond_init(
@table @b
@item EAGAIN
The system lacked a resource other than memory necessary to create the
-initialize the condition variable object.
+initialize the condition variable object.
@item ENOMEM
Insufficient memory is available to initialize the condition variable object.
@@ -179,16 +209,22 @@ The specified attribute value is invalid.
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection pthread_cond_destroy - Destroy a Condition Variable
+@findex pthread_cond_destroy
+@cindex destroy a condition variable
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_cond_destroy(
- pthread_cond_t *cond
+pthread_cond_t *cond
);
@end example
@@ -206,16 +242,22 @@ The specified condition variable is currently in use.
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection pthread_cond_signal - Signal a Condition Variable
+@findex pthread_cond_signal
+@cindex signal a condition variable
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_cond_signal(
- pthread_cond_t *cond
+pthread_cond_t *cond
);
@end example
@@ -230,19 +272,25 @@ The specified condition variable is not valid.
@subheading NOTES:
-This routine should not be invoked from a handler from an asynchronous signal
+This routine should not be invoked from a handler from an asynchronous signal
handler or an interrupt service routine.
+@c
+@c
+@c
@page
@subsection pthread_cond_broadcast - Broadcast a Condition Variable
+@findex pthread_cond_broadcast
+@cindex broadcast a condition variable
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_cond_broadcast(
- pthread_cond_t *cond
+pthread_cond_t *cond
);
@end example
@@ -257,28 +305,34 @@ The specified condition variable is not valid.
@subheading NOTES:
-This routine should not be invoked from a handler from an asynchronous signal
+This routine should not be invoked from a handler from an asynchronous signal
handler or an interrupt service routine.
+@c
+@c
+@c
@page
@subsection pthread_cond_wait - Wait on a Condition Variable
+@findex pthread_cond_wait
+@cindex wait on a condition variable
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_cond_wait(
- pthread_cond_t *cond,
- pthread_mutex_t *mutex
+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
+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.
@@ -288,31 +342,37 @@ the mutex was not owned by the current thread at the time of the call.
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection pthread_cond_timedwait - Wait with Timeout a Condition Variable
+@findex pthread_cond_timedwait
+@cindex wait with timeout a condition variable
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_cond_timedwait(
- pthread_cond_t *cond,
- pthread_mutex_t *mutex,
- const struct timespec *abstime
+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
+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
+The specified time has elapsed without the condition variable being
satisfied.
@end table
diff --git a/doc/posix_users/cspecific.t b/doc/posix_users/cspecific.t
index 9a83493a35..6ff49b4ef6 100644
--- a/doc/posix_users/cspecific.t
+++ b/doc/posix_users/cspecific.t
@@ -1,16 +1,16 @@
@c
-@c COPYRIGHT (c) 1988-1998.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
+@c COPYRIGHT (c) 1988-1998.
+@c On-Line Applications Research Corporation (OAR).
+@c All rights reserved.
@c
-@c $Id$
+@c $Id$
@c
@chapter Language-Specific Services for the C Programming Language Manager
@section Introduction
-The
+The
language-specific services for the C programming language manager is ...
The directives provided by the language-specific services for the C programming language manager are:
@@ -25,10 +25,10 @@ The directives provided by the language-specific services for the C programming
@item @code{getc_unlocked} - Get Character without Locking
@item @code{getchar_unlocked} - Get Character from stdin without Locking
@item @code{putc_unlocked} - Put Character without Locking
-@item @code{putchar_unlocked} - Put Character to stdin without Locking
+@item @code{putchar_unlocked} - Put Character to stdin without Locking
@item @code{setjmp} - Save Context for Non-Local Goto
@item @code{longjmp} - Non-Local Jump to a Saved Context
-@item @code{sigsetjmp} - Save Context with Signal Status for Non-Local Goto
+@item @code{sigsetjmp} - Save Context with Signal Status for Non-Local Goto
@item @code{siglongjmp} - Non-Local Jump with Signal Status to a Saved Context
@item @code{tzset} - Initialize Time Conversion Information
@item @code{strtok_r} - Reentrant Extract Token from String
@@ -54,9 +54,15 @@ A subsection is dedicated to each of this manager's directives
and describes the calling sequence, related constants, usage,
and status codes.
+@c
+@c
+@c
@page
@subsection setlocale - Set the Current Locale
+@findex setlocale
+@cindex set the current locale
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -81,9 +87,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection fileno - Obtain File Descriptor Number for this File
+@findex fileno
+@cindex obtain file descriptor number for this file
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -108,9 +120,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection fdopen - Associate Stream with File Descriptor
+@findex fdopen
+@cindex associate stream with file descriptor
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -135,14 +153,20 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection flockfile - Acquire Ownership of File Stream
+@findex flockfile
+@cindex acquire ownership of file stream
+
@subheading CALLING SEQUENCE:
@ifset is-C
@example
-int flcokfile(
+int flockfile(
);
@end example
@end ifset
@@ -162,9 +186,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection ftrylockfile - Poll to Acquire Ownership of File Stream
+@findex ftrylockfile
+@cindex poll to acquire ownership of file stream
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -189,9 +219,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection funlockfile - Release Ownership of File Stream
+@findex funlockfile
+@cindex release ownership of file stream
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -216,9 +252,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection getc_unlocked - Get Character without Locking
+@findex getc_unlocked
+@cindex get character without locking
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -243,9 +285,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection getchar_unlocked - Get Character from stdin without Locking
+@findex getchar_unlocked
+@cindex get character from stdin without locking
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -270,9 +318,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection putc_unlocked - Put Character without Locking
+@findex putc_unlocked
+@cindex put character without locking
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -297,9 +351,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection putchar_unlocked - Put Character to stdin without Locking
+@findex putchar_unlocked
+@cindex put character to stdin without locking
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -324,9 +384,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection setjmp - Save Context for Non-Local Goto
+@findex setjmp
+@cindex save context for non
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -351,9 +417,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection longjmp - Non-Local Jump to a Saved Context
+@findex longjmp
+@cindex non
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -378,9 +450,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection sigsetjmp - Save Context with Signal Status for Non-Local Goto
+@findex sigsetjmp
+@cindex save context with signal status for non
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -405,9 +483,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection siglongjmp - Non-Local Jump with Signal Status to a Saved Context
+@findex siglongjmp
+@cindex non
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -432,9 +516,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection tzset - Initialize Time Conversion Information
+@findex tzset
+@cindex initialize time conversion information
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -459,9 +549,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection strtok_r - Reentrant Extract Token from String
+@findex strtok_r
+@cindex reentrant extract token from string
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -486,9 +582,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection asctime_r - Reentrant struct tm to ASCII Time Conversion
+@findex asctime_r
+@cindex reentrant struct tm to ascii time conversion
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -513,9 +615,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection ctime_r - Reentrant time_t to ASCII Time Conversion
+@findex ctime_r
+@cindex reentrant time_t to ascii time conversion
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -540,9 +648,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection gmtime_r - Reentrant UTC Time Conversion
+@findex gmtime_r
+@cindex reentrant utc time conversion
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -567,9 +681,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection localtime_r - Reentrant Local Time Conversion
+@findex localtime_r
+@cindex reentrant local time conversion
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -594,9 +714,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection rand_r - Reentrant Random Number Generation
+@findex rand_r
+@cindex reentrant random number generation
+
@subheading CALLING SEQUENCE:
@ifset is-C
diff --git a/doc/posix_users/device.t b/doc/posix_users/device.t
index 05ef101fec..542a20e519 100644
--- a/doc/posix_users/device.t
+++ b/doc/posix_users/device.t
@@ -1,9 +1,9 @@
@c
-@c COPYRIGHT (c) 1988-1998.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
+@c COPYRIGHT (c) 1988-1998.
+@c On-Line Applications Research Corporation (OAR).
+@c All rights reserved.
@c
-@c $Id$
+@c $Id$
@c
@chapter Device- and Class- Specific Functions Manager
@@ -41,13 +41,19 @@ There is currently no text in this section.
@section Directives
This section details the device- and class- specific functions manager's
-directives. A subsection is dedicated to each of this manager's directives
+directives. A subsection is dedicated to each of this manager's directives
and describes the calling sequence, related constants, usage,
and status codes.
+@c
+@c
+@c
@page
@subsection cfgetispeed - Reads terminal input baud rate
+@findex cfgetispeed
+@cindex reads terminal input baud rate
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -55,7 +61,7 @@ and status codes.
#include <termios.h>
int cfgetispeed(
- const struct termios *p
+const struct termios *p
);
@end example
@end ifset
@@ -65,12 +71,12 @@ int cfgetispeed(
@subheading STATUS CODES:
-The @code{cfgetispeed()} function returns a code for baud rate.
+The @code{cfgetispeed()} function returns a code for baud rate.
@subheading DESCRIPTION:
-The @code{cfsetispeed()} function stores a code for the terminal speed
-stored in a struct termios. The codes are defined in @code{<termios.h>}
+The @code{cfsetispeed()} function stores a code for the terminal speed
+stored in a struct termios. The codes are defined in @code{<termios.h>}
by the macros BO, B50, B75, B110, B134, B150, B200, B300, B600, B1200,
B1800, B2400, B4800, B9600, B19200, and B38400.
@@ -79,20 +85,26 @@ It merely stores a value for use by @code{tcsetattr()}.
@subheading NOTES:
-Baud rates are defined by symbols, such as B110, B1200, B2400. The actual
+Baud rates are defined by symbols, such as B110, B1200, B2400. The actual
number returned for any given speed may change from system to system.
+@c
+@c
+@c
@page
@subsection cfgetospeed - Reads terminal output baud rate
+@findex cfgetospeed
+@cindex reads terminal output baud rate
+
@subheading CALLING SEQUENCE:
@ifset is-C
@example
#include <termios.h>
-int cfgetospeed(
- const struct termios *p
+int cfgetospeed(
+const struct termios *p
);
@end example
@end ifset
@@ -107,7 +119,7 @@ The @code{cfgetospeed()} function returns the termios code for the baud rate.
@subheading DESCRIPTION:
The @code{cfgetospeed()} function returns a code for the terminal speed
-stored in a @code{struct termios}. The codes are defined in @code{<termios.h>}
+stored in a @code{struct termios}. The codes are defined in @code{<termios.h>}
by the macros BO, B50, B75, B110, B134, B150, B200, B300, B600, B1200, B1800,
B2400, B4800, B9600, B19200, and B38400.
@@ -116,12 +128,18 @@ It merely returns the value stored by a previous call to @code{tcgetattr()}.
@subheading NOTES:
-Baud rates are defined by symbols, such as B110, B1200, B2400. The actual
+Baud rates are defined by symbols, such as B110, B1200, B2400. The actual
number returned for any given speed may change from system to system.
+@c
+@c
+@c
@page
@subsection cfsetispeed - Sets terminal input baud rate
+@findex cfsetispeed
+@cindex sets terminal input baud rate
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -129,8 +147,8 @@ number returned for any given speed may change from system to system.
#include <termios.h>
int cfsetispeed(
- struct termios *p,
- speed_t speed
+struct termios *p,
+speed_t speed
);
@end example
@end ifset
@@ -140,24 +158,30 @@ int cfsetispeed(
@subheading STATUS CODES:
-The @code{cfsetispeed()} function returns a zero when successful and
-returns -1 when an error occurs.
+The @code{cfsetispeed()} function returns a zero when successful and
+returns -1 when an error occurs.
@subheading DESCRIPTION:
The @code{cfsetispeed()} function stores a code for the terminal speed
-stored in a struct termios. The codes are defined in @code{<termios.h>}
-by the macros B0, B50, B75, B110, B134, B150, B200, B300, B600, B1200,
+stored in a struct termios. The codes are defined in @code{<termios.h>}
+by the macros B0, B50, B75, B110, B134, B150, B200, B300, B600, B1200,
B1800, B2400, B4800, B9600, B19200, and B38400.
@subheading NOTES:
-This function merely stores a value in the @code{termios} structure. It
-does not change the terminal speed until a @code{tcsetattr()} is done.
+This function merely stores a value in the @code{termios} structure. It
+does not change the terminal speed until a @code{tcsetattr()} is done.
It does not detect impossible terminal speeds.
+@c
+@c
+@c
@page
-@subsection cfsetospeed - Sets terminal output baud rate
+@subsection cfsetospeed - Sets terminal output baud rate
+
+@findex cfsetospeed
+@cindex sets terminal output baud rate
@subheading CALLING SEQUENCE:
@@ -166,8 +190,8 @@ It does not detect impossible terminal speeds.
#include <termios.h>
int cfsetospeed(
- struct termios *p,
- speed_t speed
+struct termios *p,
+speed_t speed
);
@end example
@end ifset
@@ -177,29 +201,35 @@ int cfsetospeed(
@subheading STATUS CODES:
-The @code{cfsetospeed()} function returns a zero when successful and
-returns -1 when an error occurs.
+The @code{cfsetospeed()} function returns a zero when successful and
+returns -1 when an error occurs.
@subheading DESCRIPTION:
-The @code{cfsetospeed()} function stores a code for the terminal speed stored
-in a struct @code{termios}. The codes are defiined in @code{<termios.h>} by the
+The @code{cfsetospeed()} function stores a code for the terminal speed stored
+in a struct @code{termios}. The codes are defiined in @code{<termios.h>} by the
macros B0, B50, B75, B110, B134, B150, B200, B300, B600, B1200, B1800, B2400,
B4800, B9600, B19200, and B38400.
-The @code{cfsetospeed()} function does not do anything to the hardware. It
+The @code{cfsetospeed()} function does not do anything to the hardware. It
merely stores a value for use by @code{tcsetattr()}.
@subheading NOTES:
-This function merely stores a value in the @code{termios} structure.
+This function merely stores a value in the @code{termios} structure.
It does not change the terminal speed until a @code{tcsetattr()} is done.
It does not detect impossible terminal speeds.
+@c
+@c
+@c
@page
@subsection tcgetattr - Gets terminal attributes
+@findex tcgetattr
+@cindex gets terminal attributes
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -208,8 +238,8 @@ It does not detect impossible terminal speeds.
#include <unistd.h>
int tcgetattr(
- int fildes,
- struct termios *p
+int fildes,
+struct termios *p
);
@end example
@end ifset
@@ -237,9 +267,15 @@ structure pointed to by @code{termios_p}.
NONE
+@c
+@c
+@c
@page
@subsection tcsetattr - Set terminal attributes
+@findex tcsetattr
+@cindex set terminal attributes
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -248,9 +284,9 @@ NONE
#include <unistd.h>
int tcsetattr(
- int fildes,
- int options,
- const struct termios *tp
+int fildes,
+int options,
+const struct termios *tp
);
@end example
@end ifset
@@ -270,8 +306,14 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
-@subsection tcsendbreak - Sends a break to a terminal
+@subsection tcsendbreak - Sends a break to a terminal
+
+@findex tcsendbreak
+@cindex sends a break to a terminal
@subheading CALLING SEQUENCE:
@@ -297,12 +339,18 @@ The
@subheading NOTES:
-This routine is not currently supported by RTEMS but could be
+This routine is not currently supported by RTEMS but could be
in a future version.
+@c
+@c
+@c
@page
@subsection tcdrain - Waits for all output to be transmitted to the terminal.
+@findex tcdrain
+@cindex waits for all output to be transmitted to the terminal.
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -311,7 +359,7 @@ in a future version.
#include <unistd.h>
int tcdrain(
- int fildes
+int fildes
);
@end example
@end ifset
@@ -335,15 +383,21 @@ Terminal control function attempted for a file that is not a terminal.
@subheading DESCRIPTION:
-The @code{tcdrain()} function waits until all output written to
+The @code{tcdrain()} function waits until all output written to
@code{fildes} has been transmitted.
@subheading NOTES:
NONE
+@c
+@c
+@c
@page
-@subsection tcflush - Discards terminal data
+@subsection tcflush - Discards terminal data
+
+@findex tcflush
+@cindex discards terminal data
@subheading CALLING SEQUENCE:
@@ -369,12 +423,18 @@ The
@subheading NOTES:
-This routine is not currently supported by RTEMS but could be
+This routine is not currently supported by RTEMS but could be
in a future version.
+@c
+@c
+@c
@page
@subsection tcflow - Suspends/restarts terminal output.
+@findex tcflow
+@cindex suspends/restarts terminal output.
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -399,12 +459,18 @@ The
@subheading NOTES:
-This routine is not currently supported by RTEMS but could be
+This routine is not currently supported by RTEMS but could be
in a future version.
+@c
+@c
+@c
@page
@subsection tcgetpgrp - Gets foreground process group ID
+@findex tcgetpgrp
+@cindex gets foreground process group id
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -429,12 +495,18 @@ The
@subheading NOTES:
-This routine is not currently supported by RTEMS but could be
+This routine is not currently supported by RTEMS but could be
in a future version.
+@c
+@c
+@c
@page
@subsection tcsetpgrp - Sets foreground process group ID
+@findex tcsetpgrp
+@cindex sets foreground process group id
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -459,7 +531,7 @@ The
@subheading NOTES:
-This routine is not currently supported by RTEMS but could be
+This routine is not currently supported by RTEMS but could be
in a future version.
diff --git a/doc/posix_users/files.t b/doc/posix_users/files.t
index 7d985ff919..2ae34b1e18 100644
--- a/doc/posix_users/files.t
+++ b/doc/posix_users/files.t
@@ -1,9 +1,9 @@
@c
-@c COPYRIGHT (c) 1988-1998.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
+@c COPYRIGHT (c) 1988-1998.
+@c On-Line Applications Research Corporation (OAR).
+@c All rights reserved.
@c
-@c $Id$
+@c $Id$
@c
@chapter Files and Directories Manager
@@ -17,7 +17,7 @@ The directives provided by the files and directories manager are:
@itemize @bullet
@item @code{opendir} - Open a Directory
@item @code{readdir} - Reads a directory
-@item @code{rewinddir} - Resets the @code{readdir()} pointer
+@item @code{rewinddir} - Resets the @code{readdir()} pointer
@item @code{scandir} - Scan a directory for matching entries
@item @code{telldir} - Return current location in directory stream
@item @code{closedir} - Ends directory read operation
@@ -32,9 +32,9 @@ The directives provided by the files and directories manager are:
@item @code{readlink} - Obtain the name of the link destination
@item @code{mkdir} - Makes a directory
@item @code{mkfifo} - Makes a FIFO special file
-@item @code{unlink} - Removes a directory entry
+@item @code{unlink} - Removes a directory entry
@item @code{rmdir} - Delete a directory
-@item @code{rename} - Renames a file
+@item @code{rename} - Renames a file
@item @code{stat} - Gets information about a file.
@item @code{fstat} - Gets file status
@item @code{access} - Check permissions for a file.
@@ -54,16 +54,16 @@ The directives provided by the files and directories manager are:
@subsection Path Name Evaluation
A pathname is a string that consists of no more than @code{PATH_MAX}
-bytes, including the terminating null character. A pathname has an optional
-beginning slash, followed by zero or more filenames separated by slashes.
+bytes, including the terminating null character. A pathname has an optional
+beginning slash, followed by zero or more filenames separated by slashes.
If the pathname refers to a directory, it may also have one or more trailing
-slashes. Multiple successive slahes are considered to be the same as
-one slash.
+slashes. Multiple successive slahes are considered to be the same as
+one slash.
POSIX allows a pathname that begins with precisely two successive slashes to be
-interpreted in an implementation-defined manner. RTEMS does not currently
-recognize this as a special condition. Any number of successive
-slashes is treated the same as a single slash. POSIX requires that
+interpreted in an implementation-defined manner. RTEMS does not currently
+recognize this as a special condition. Any number of successive
+slashes is treated the same as a single slash. POSIX requires that
an implementation treat more than two leading slashes as a single slash.
@section Operations
@@ -77,9 +77,15 @@ A subsection is dedicated to each of this manager's directives
and describes the calling sequence, related constants, usage,
and status codes.
+@c
+@c
+@c
@page
@subsection opendir - Open a Directory
+@findex opendir
+@cindex open a directory
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -88,7 +94,7 @@ and status codes.
#include <dirent.h>
int opendir(
- const char *dirname
+const char *dirname
);
@end example
@end ifset
@@ -123,16 +129,22 @@ Insufficient memory to complete the operation.
@subheading DESCRIPTION:
This routine opens a directory stream corresponding to the
-directory specified by the @code{dirname} argument. The
+directory specified by the @code{dirname} argument. The
directory stream is positioned at the first entry.
@subheading NOTES:
The routine is implemented in Cygnus newlib.
+@c
+@c
+@c
@page
@subsection readdir - Reads a directory
+@findex readdir
+@cindex reads a directory
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -141,7 +153,7 @@ The routine is implemented in Cygnus newlib.
#include <dirent.h>
int readdir(
- DIR *dirp
+DIR *dirp
);
@end example
@end ifset
@@ -161,26 +173,32 @@ Invalid file descriptor
The @code{readdir()} function returns a pointer to a structure @code{dirent}
representing the next directory entry from the directory stream pointed to
-by @code{dirp}. On end-of-file, NULL is returned.
+by @code{dirp}. On end-of-file, NULL is returned.
The @code{readdir()} function may (or may not) return entries for . or .. Your
program should tolerate reading dot and dot-dot but not require them.
The data pointed to be @code{readdir()} may be overwritten by another call to
-@code{readdir()} for the same directory stream. It will not be overwritten by
+@code{readdir()} for the same directory stream. It will not be overwritten by
a call for another directory.
-@subheading NOTES:
+@subheading NOTES:
-If @code{ptr} is not a pointer returned by @code{malloc()}, @code{calloc()}, or
+If @code{ptr} is not a pointer returned by @code{malloc()}, @code{calloc()}, or
@code{realloc()} or has been deallocated with @code{free()} or
@code{realloc()}, the results are not portable and are probably disastrous.
The routine is implemented in Cygnus newlib.
+@c
+@c
+@c
@page
@subsection rewinddir - Resets the readdir() pointer
+@findex rewinddir
+@cindex resets the readdir() pointer
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -189,7 +207,7 @@ The routine is implemented in Cygnus newlib.
#include <dirent.h>
void rewinddir(
- DIR *dirp
+DIR *dirp
);
@end example
@end ifset
@@ -204,10 +222,10 @@ No value is returned.
@subheading DESCRIPTION:
The @code{rewinddir()} function resets the position associated with
-the directory stream pointed to by @code{dirp}. It also causes the
+the directory stream pointed to by @code{dirp}. It also causes the
directory stream to refer to the current state of the directory.
-@subheading NOTES:
+@subheading NOTES:
NONE
@@ -216,9 +234,15 @@ undefined.
The routine is implemented in Cygnus newlib.
+@c
+@c
+@c
@page
@subsection scandir - Scan a directory for matching entries
+@findex scandir
+@cindex scan a directory for matching entries
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -226,10 +250,10 @@ The routine is implemented in Cygnus newlib.
#include <dirent.h>
int scandir(
- const char *dir,
- struct direct ***namelist,
- int (*select)(const struct dirent *),
- int (*compar)(const struct dirent **, const struct dirent **)
+const char *dir,
+struct direct ***namelist,
+int (*select)(const struct dirent *),
+int (*compar)(const struct dirent **, const struct dirent **)
);
@end example
@end ifset
@@ -248,8 +272,8 @@ Insufficient memory to complete the operation.
@subheading DESCRIPTION:
The @code{scandir()} function scans the directory @code{dir}, calling
-@code{select()} on each directory entry. Entries for which @code{select()}
-returns non-zero are stored in strings allocated via @code{malloc()},
+@code{select()} on each directory entry. Entries for which @code{select()}
+returns non-zero are stored in strings allocated via @code{malloc()},
sorted using @code{qsort()} with the comparison function @code{compar()},
and collected in array @code{namelist} which is allocated via @code{malloc()}.
If @code{select} is NULL, all entries are selected.
@@ -258,9 +282,15 @@ If @code{select} is NULL, all entries are selected.
The routine is implemented in Cygnus newlib.
+@c
+@c
+@c
@page
@subsection telldir - Return current location in directory stream
+@findex telldir
+@cindex return current location in directory stream
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -268,7 +298,7 @@ The routine is implemented in Cygnus newlib.
#include <dirent.h>
off_t telldir(
- DIR *dir
+DIR *dir
);
@end example
@end ifset
@@ -289,12 +319,18 @@ Invalid directory stream descriptor @code{dir}.
The @code{telldir()} function returns the current location associated with the
directory stream @code{dir}.
-@subheading NOTES:
+@subheading NOTES:
The routine is implemented in Cygnus newlib.
+@c
+@c
+@c
@page
-@subsection closedir - Ends directory read operation
+@subsection closedir - Ends directory read operation
+
+@findex closedir
+@cindex ends directory read operation
@subheading CALLING SEQUENCE:
@@ -304,7 +340,7 @@ The routine is implemented in Cygnus newlib.
#include <dirent.h>
int closedir(
- DIR *dirp
+DIR *dirp
);
@end example
@end ifset
@@ -326,19 +362,25 @@ The directory stream associated with @code{dirp} is closed.
The value in @code{dirp} may not be usable after a call to
@code{closedir()}.
-@subheading NOTES:
+@subheading NOTES:
NONE
-The argument to @code{closedir()} must be a pointer returned by
-@code{opendir()}. If it is not, the results are not portable and
+The argument to @code{closedir()} must be a pointer returned by
+@code{opendir()}. If it is not, the results are not portable and
most likely unpleasant.
The routine is implemented in Cygnus newlib.
+@c
+@c
+@c
@page
@subsection chdir - Changes the current working directory
+@findex chdir
+@cindex changes the current working directory
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -346,7 +388,7 @@ The routine is implemented in Cygnus newlib.
#include <unistd.h>
int chdir(
- const char *path
+const char *path
);
@end example
@end ifset
@@ -361,7 +403,7 @@ int chdir(
Search permission is denied for a directory in a file's path prefix.
@item ENAMETOOLONG
-Length of a filename string exceeds PATH_MAX and _POSIX_NO_TRUNC is
+Length of a filename string exceeds PATH_MAX and _POSIX_NO_TRUNC is
in effect.
@item ENOENT
@@ -379,15 +421,21 @@ The @code{chdir()} function causes the directory named by @code{path} to
become the current working directory; that is, the starting point for
searches of pathnames not beginning with a slash.
-If @code{chdir()} detects an error, the current working directory is not
+If @code{chdir()} detects an error, the current working directory is not
changed.
@subheading NOTES:
NONE
+@c
+@c
+@c
@page
-@subsection getcwd - Gets current working directory
+@subsection getcwd - Gets current working directory
+
+@findex getcwd
+@cindex gets current working directory
@subheading CALLING SEQUENCE:
@@ -419,13 +467,13 @@ Search permission is denied for a directory in a file's path prefix.
@subheading DESCRIPTION:
The @code{getcwd()} function copies the absolute pathname of the current
-working directory to the character array pointed to by @code{buf}. The
+working directory to the character array pointed to by @code{buf}. The
@code{size} argument is the number of bytes available in @code{buf}
@subheading NOTES:
There is no way to determine the maximum string length that @code{fetcwd()}
-may need to return. Applications should tolerate getting @code{ERANGE}
+may need to return. Applications should tolerate getting @code{ERANGE}
and allocate a larger buffer.
It is possible for @code{getcwd()} to return EACCES if, say, @code{login}
@@ -434,9 +482,15 @@ puts the process into a directory without read access.
The 1988 standard uses @code{int} instead of @code{size_t} for the second
parameter.
+@c
+@c
+@c
@page
@subsection open - Opens a file
+@findex open
+@cindex opens a file
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -446,9 +500,9 @@ parameter.
#include <fcntl.h>
int open(
- const char *path,
- int oflag,
- mode_t mode
+const char *path,
+int oflag,
+mode_t mode
);
@end example
@end ifset
@@ -494,7 +548,7 @@ A component of the specified pathname was not a directory when a directory
was expected.
@item ENXIO
-No such device. This error may also occur when a device is not ready, for
+No such device. This error may also occur when a device is not ready, for
example, a tape drive is off-line.
@item EROFS
@@ -503,13 +557,13 @@ Read-only file system.
@subheading DESCRIPTION:
-The @code{open} function establishes a connection between a file and a file
-descriptor. The file descriptor is a small integer that is used by I/O
-functions to reference the file. The @code{path} argument points to the
+The @code{open} function establishes a connection between a file and a file
+descriptor. The file descriptor is a small integer that is used by I/O
+functions to reference the file. The @code{path} argument points to the
pathname for the file.
-The @code{oflag} argument is the bitwise inclusive OR of the values of
-symbolic constants. The programmer must specify exactly one of the following
+The @code{oflag} argument is the bitwise inclusive OR of the values of
+symbolic constants. The programmer must specify exactly one of the following
three symbols:
@table @b
@@ -531,39 +585,45 @@ Any combination of the following symbols may also be used.
Set the file offset to the end-of-file prior to each write.
@item O_CREAT
-If the file does not exist, allow it to be created. This flag indicates
+If the file does not exist, allow it to be created. This flag indicates
that the @code{mode} argument is present in the call to @code{open}.
@item O_EXCL
-This flag may be used only if O_CREAT is also set. It causes the call
+This flag may be used only if O_CREAT is also set. It causes the call
to @code{open} to fail if the file already exists.
@item O_NOCTTY
If @code{path} identifies a terminal, this flag prevents that teminal from
-becoming the controlling terminal for thi9s process. See Chapter 8 for a
+becoming the controlling terminal for thi9s process. See Chapter 8 for a
description of terminal I/O.
@item O_NONBLOCK
-Do no wait for the device or file to be ready or available. After the file
-is open, the @code{read} and @code{write} calls return immediately. If the
-process would be delayed in the read or write opermation, -1 is returned and
+Do no wait for the device or file to be ready or available. After the file
+is open, the @code{read} and @code{write} calls return immediately. If the
+process would be delayed in the read or write opermation, -1 is returned and
@code{errno} is set to @code{EAGAIN} instead of blocking the caller.
@item O_TRUNC
-This flag should be used only on ordinary files opened for writing. It
+This flag should be used only on ordinary files opened for writing. It
causes the file to be tuncated to zero length..
@end table
-Upon successful completion, @code{open} returns a non-negative file
+Upon successful completion, @code{open} returns a non-negative file
descriptor.
-@subheading NOTES:
+@subheading NOTES:
NONE
+@c
+@c
+@c
@page
-@subsection creat - Create a new file or rewrite an existing one
+@subsection creat - Create a new file or rewrite an existing one
+
+@findex creat
+@cindex create a new file or rewrite an existing one
@subheading CALLING SEQUENCE:
@@ -574,8 +634,8 @@ NONE
#include <fcntl.h>
int creat(
- const char *path,
- mode_t mode
+const char *path,
+mode_t mode
);
@end example
@end ifset
@@ -601,7 +661,7 @@ executed and write access was requested
@code{path} points outside your accessible address space
@item EACCES
-The requested access to the file is not allowed, or one of the
+The requested access to the file is not allowed, or one of the
directories in @code{path} did not allow search (execute) permission.
@item ENAMETOOLONG
@@ -612,14 +672,14 @@ A directory component in @code{path} does not exist or is a dangling
symbolic link.
@item ENOTDIR
-A component used as a directory in @code{path} is not, in fact, a
+A component used as a directory in @code{path} is not, in fact, a
directory.
@item EMFILE
The process alreadyh has the maximum number of files open.
@item ENFILE
-The limit on the total number of files open on the system has been
+The limit on the total number of files open on the system has been
reached.
@item ENOMEM
@@ -642,9 +702,15 @@ NONE
The routine is implemented in Cygnus newlib.
+@c
+@c
+@c
@page
@subsection umask - Sets a file creation mask.
+@findex umask
+@cindex sets a file creation mask.
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -653,7 +719,7 @@ The routine is implemented in Cygnus newlib.
#include <sys/stat.h>
mode_t umask(
- mode_t cmask
+mode_t cmask
);
@end example
@end ifset
@@ -671,21 +737,27 @@ The file creation mask is used during @code{open()}, @code{creat()}, @code{mkdir
Bit positions that are set in @code{cmask} are cleared in the mode of the
created file.
-@subheading NOTES:
+@subheading NOTES:
NONE
-The @code{cmask} argument should have only permission bits set. All other
+The @code{cmask} argument should have only permission bits set. All other
bits should be zero.
In a system which supports multiple processes, the file creation mask is inherited
-across @code{fork()} and @code{exec()} calls. This makes it possible to alter the
-default permission bits of created files. RTEMS does not support multiple processes
+across @code{fork()} and @code{exec()} calls. This makes it possible to alter the
+default permission bits of created files. RTEMS does not support multiple processes
so this behavior is not possible.
+@c
+@c
+@c
@page
@subsection link - Creates a link to a file
+@findex link
+@cindex creates a link to a file
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -693,8 +765,8 @@ so this behavior is not possible.
#include <unistd.h>
int link(
- const char *existing,
- const char *new
+const char *existing,
+const char *new
);
@end example
@end ifset
@@ -729,7 +801,7 @@ A component of the specified pathname was not a directory when a directory
was expected.
@item EPERM
-Operation is not permitted. Process does not have the appropriate priviledges
+Operation is not permitted. Process does not have the appropriate priviledges
or permissions to perform the requested operations.
@item EROFS
@@ -755,9 +827,15 @@ The caller may (or may not) need permission to access the existing file.
NONE
+@c
+@c
+@c
@page
@subsection symlink - Creates a symbolic link to a file
+@findex symlink
+@cindex creates a symbolic link to a file
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -799,8 +877,8 @@ A component of the specified pathname was not a directory when a directory
was expected.
@item EPERM
-Operation is not permitted. Process does not have the appropriate priviledges
-or permissions to perform the requested operations.
+Operation is not permitted. Process does not have the appropriate priviledges
+or permissions to perform the requested operations.
@item EROFS
Read-only file system.
@@ -810,7 +888,7 @@ Read-only file system.
@subheading DESCRIPTION:
The @code{symlink()} function creates a symbolic link from the frombath to the
-topath. The symbolic link will be interpreted at run-time.
+topath. The symbolic link will be interpreted at run-time.
If the @code{symlink()} function fails, no directories are modified.
@@ -820,9 +898,15 @@ The caller may (or may not) need permission to access the existing file.
NONE
+@c
+@c
+@c
@page
@subsection readlink - Obtain the name of a symbolic link destination
+@findex readlink
+@cindex obtain the name of a symbolic link destination
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -830,9 +914,9 @@ NONE
#include <unistd.h>
int readlink(
- const char *path,
- char *buf,
- size_t bufsize
+const char *path,
+char *buf,
+size_t bufsize
);
@end example
@@ -872,19 +956,25 @@ An invalid pointer was passed into the @code{readlink()} routine.
@subheading DESCRIPTION:
-The @code{readlink()} function places the symbolic link destination into
+The @code{readlink()} function places the symbolic link destination into
@code{buf} argument and returns the number of characters copied.
-If the symbolic link destination is longer than bufsize characters the
+If the symbolic link destination is longer than bufsize characters the
name will be truncated.
@subheading NOTES:
NONE
+@c
+@c
+@c
@page
@subsection mkdir - Makes a directory
+@findex mkdir
+@cindex makes a directory
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -893,8 +983,8 @@ NONE
#include <sys/stat.h>
int mkdir(
- const char *path,
- mode_t mode
+const char *path,
+mode_t mode
);
@end example
@end ifset
@@ -909,7 +999,7 @@ int mkdir(
Search permission is denied for a directory in a file's path prefix
@item EEXIST
-The name file already exist.
+The name file already exist.
@item EMLINK
The number of links would exceed LINK_MAX
@@ -935,7 +1025,7 @@ Read-only file system.
@subheading DESCRIPTION:
-The @code{mkdir()} function creates a new diectory named @code{path}. The
+The @code{mkdir()} function creates a new diectory named @code{path}. The
permission bits (modified by the file creation mask) are set from @code{mode}.
The owner and group IDs for the directory are set from the effective user ID
and group ID.
@@ -947,9 +1037,15 @@ empty.
NONE
+@c
+@c
+@c
@page
@subsection mkfifo - Makes a FIFO special file
+@findex mkfifo
+@cindex makes a fifo special file
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -959,8 +1055,8 @@ NONE
int mkfifo(
- const char *path,
- mode_t mode
+const char *path,
+mode_t mode
);
@end example
@end ifset
@@ -995,17 +1091,23 @@ Read-only file system.
@subheading DESCRIPTION:
The @code{mkfifo()} function creates a new FIFO special file named @code{path}.
-The permission bits (modified by the file creation mask) are set from
-@code{mode}. The owner and group IDs for the FIFO are set from the efective
+The permission bits (modified by the file creation mask) are set from
+@code{mode}. The owner and group IDs for the FIFO are set from the efective
user ID and group ID.
@subheading NOTES:
NONE
+@c
+@c
+@c
@page
@subsection unlink - Removes a directory entry
+@findex unlink
+@cindex removes a directory entry
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -1013,7 +1115,7 @@ NONE
#include <unistd.h>
int unlink(
- const char path
+const char path
);
@end example
@end ifset
@@ -1042,7 +1144,7 @@ A component of the specified @code{path} was not a directory when a directory
was expected.
@item EPERM
-Operation is not permitted. Process does not have the appropriate priviledges
+Operation is not permitted. Process does not have the appropriate priviledges
or permissions to perform the requested operations.
@item EROFS
@@ -1053,16 +1155,22 @@ Read-only file system.
@subheading DESCRIPTION:
The @code{unlink} function removes the link named by @code{path} and decrements the
-link count of the file referenced by the link. When the link count goes to zero
+link count of the file referenced by the link. When the link count goes to zero
and no process has the file open, the space occupied by the file is freed and the
-file is no longer accessible.
+file is no longer accessible.
@subheading NOTES:
NONE
+@c
+@c
+@c
@page
-@subsection rmdir - Delete a directory
+@subsection rmdir - Delete a directory
+
+@findex rmdir
+@cindex delete a directory
@subheading CALLING SEQUENCE:
@@ -1071,7 +1179,7 @@ NONE
#include <unistd.h>
int rmdir(
- const char *pathname
+const char *pathname
);
@end example
@end ifset
@@ -1091,19 +1199,19 @@ of directories.
@item EACCES
Write access to the directory containing @code{pathname} was not
-allowed for the process's effective uid, or one of the directories in
+allowed for the process's effective uid, or one of the directories in
@code{pathname} did not allow search (execute) permission.
@item EPERM
-The directory containing @code{pathname} has the stickybit (S_ISVTX)
-set and the process's effective uid is neither the uid of the file to
+The directory containing @code{pathname} has the stickybit (S_ISVTX)
+set and the process's effective uid is neither the uid of the file to
be delected nor that of the director containing it.
@item ENAMETOOLONG
@code{pathname} was too long.
@item ENOENT
-A dirctory component in @code{pathname} does not exist or is a
+A dirctory component in @code{pathname} does not exist or is a
dangling symbolic link.
@item ENOTDIR
@@ -1114,11 +1222,11 @@ is not, in fact, a directory.
@code{pathname} contains entries other than . and .. .
@item EBUSY
-@code{pathname} is the current working directory or root directory of
+@code{pathname} is the current working directory or root directory of
some process
@item EBUSY
-@code{pathname} is the current directory or root directory of some
+@code{pathname} is the current directory or root directory of some
process.
@item ENOMEM
@@ -1141,8 +1249,14 @@ Insufficient kernel memory was available
NONE
+@c
+@c
+@c
@page
-@subsection rename - Renames a file
+@subsection rename - Renames a file
+
+@findex rename
+@cindex renames a file
@subheading CALLING SEQUENCE:
@@ -1151,8 +1265,8 @@ NONE
#include <unistd.h>
int rename(
- const char *old,
- const char *new
+const char *old,
+const char *new
);
@end example
@end ifset
@@ -1176,7 +1290,7 @@ The named file already exists.
Invalid argument.
@item EISDIR
-Attempt to open a directory for writing or to rename a file to be a
+Attempt to open a directory for writing or to rename a file to be a
directory.
@item EMLINK
@@ -1193,7 +1307,7 @@ A file or directory does no exist.
No space left on disk.
@item ENOTDIR
-A component of the specified pathname was not a directory when a
+A component of the specified pathname was not a directory when a
directory was expected.
@item ENOTEMPTY
@@ -1208,19 +1322,19 @@ Attempt to link a file to another file system.
@subheading DESCRIPTION:
-The @code{rename()} function causes the file known bo @code{old} to
-now be known as @code{new}.
+The @code{rename()} function causes the file known bo @code{old} to
+now be known as @code{new}.
Ordinary files may be renamed to ordinary files, and directories may be
-renamed to directories; however, files cannot be converted using
-@code{rename()}. The @code{new} pathname may not contain a path prefix
+renamed to directories; however, files cannot be converted using
+@code{rename()}. The @code{new} pathname may not contain a path prefix
of @code{old}.
@subheading NOTES:
-If a file already exists by the name @code{new}, it is removed. The
-@code{rename()} function is atomic. If the @code{rename()} detects an
-error, no files are removed. This guarantees that the
+If a file already exists by the name @code{new}, it is removed. The
+@code{rename()} function is atomic. If the @code{rename()} detects an
+error, no files are removed. This guarantees that the
@code{rename("x", "x")} does not remove @code{x}.
You may not rename dot or dot-dot.
@@ -1228,8 +1342,14 @@ You may not rename dot or dot-dot.
The routine is implemented in Cygnus newlib using @code{link()} and
@code{unlink()}.
+@c
+@c
+@c
@page
-@subsection stat - Gets information about a file
+@subsection stat - Gets information about a file
+
+@findex stat
+@cindex gets information about a file
@subheading CALLING SEQUENCE:
@@ -1239,8 +1359,8 @@ The routine is implemented in Cygnus newlib using @code{link()} and
#include <sys/stat.h>
int stat(
- const char *path,
- struct stat *buf
+const char *path,
+struct stat *buf
);
@end example
@end ifset
@@ -1265,16 +1385,16 @@ in effect.
A file or directory does not exist.
@item ENOTDIR
-A component of the specified pathname was not a directory when a
+A component of the specified pathname was not a directory when a
directory was expected.
@end table
@subheading DESCRIPTION:
-The @code{path} argument points to a pathname for a file. Read, write, or
+The @code{path} argument points to a pathname for a file. Read, write, or
execute permission for the file is not required, but all directories listed
-in @code{path} must be searchable. The @code{stat()} function obtains
+in @code{path} must be searchable. The @code{stat()} function obtains
information about the named file and writes it to the area pointed to by
@code{buf}.
@@ -1282,8 +1402,14 @@ information about the named file and writes it to the area pointed to by
NONE
+@c
+@c
+@c
@page
-@subsection fstat - Gets file status
+@subsection fstat - Gets file status
+
+@findex fstat
+@cindex gets file status
@subheading CALLING SEQUENCE:
@@ -1293,8 +1419,8 @@ NONE
#include <sys/stat.h>
int fstat(
- int fildes,
- struct stat *buf
+int fildes,
+struct stat *buf
);
@end example
@end ifset
@@ -1320,9 +1446,15 @@ to by the @code{buf} argument.
NONE
+@c
+@c
+@c
@page
@subsection access - Check permissions for a file
+@findex access
+@cindex check permissions for a file
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -1330,8 +1462,8 @@ NONE
#include <unistd.h>
int access(
- const char *pathname,
- int mode
+const char *pathname,
+int mode
);
@end example
@end ifset
@@ -1360,7 +1492,7 @@ A directory component in @code{pathname} would have been accessible but
does not exist or was a dangling symbolic link.
@item ENOTDIR
-A component used as a directory in @code{pathname} is not, in fact,
+A component used as a directory in @code{pathname} is not, in fact,
a directory.
@item ENOMEM
@@ -1370,9 +1502,9 @@ Insufficient kernel memory was available.
@subheading DESCRIPTION:
-@code{Access} checks whether the process would be allowed to read, write or
-test for existence of the file (or other file system object) whose name is
-@code{pathname}. If @code{pathname} is a symbolic link permissions of the
+@code{Access} checks whether the process would be allowed to read, write or
+test for existence of the file (or other file system object) whose name is
+@code{pathname}. If @code{pathname} is a symbolic link permissions of the
file referred by this symbolic link are tested.
@code{Mode} is a mask consisting of one or more of R_OK, W_OK, X_OK and F_OK.
@@ -1381,9 +1513,15 @@ file referred by this symbolic link are tested.
NONE
+@c
+@c
+@c
@page
@subsection chmod - Changes file mode.
+@findex chmod
+@cindex changes file mode.
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -1392,8 +1530,8 @@ NONE
#include <sys/stat.h>
int chmod(
- const char *path,
- mode_t mode
+const char *path,
+mode_t mode
);
@end example
@end ifset
@@ -1419,7 +1557,7 @@ A component of the specified pathname was not a directory when a directory
was expected.
@item EPERM
-Operation is not permitted. Process does not have the appropriate priviledges
+Operation is not permitted. Process does not have the appropriate priviledges
or permissions to perform the requested operations.
@item EROFS
@@ -1429,9 +1567,9 @@ Read-only file system.
@subheading DESCRIPTION:
-Set the file permission bits, the set user ID bit, and the set group ID bit
-for the file named by @code{path} to @code{mode}. If the effective user ID
-does not match the owner of the file and the calling process does not have
+Set the file permission bits, the set user ID bit, and the set group ID bit
+for the file named by @code{path} to @code{mode}. If the effective user ID
+does not match the owner of the file and the calling process does not have
the appropriate privileges, @code{chmod()} returns -1 and sets @code{errno} to
@code{EPERM}.
@@ -1439,8 +1577,14 @@ the appropriate privileges, @code{chmod()} returns -1 and sets @code{errno} to
NONE
+@c
+@c
+@c
@page
-@subsection fchmod - Changes permissions of a file
+@subsection fchmod - Changes permissions of a file
+
+@findex fchmod
+@cindex changes permissions of a file
@subheading CALLING SEQUENCE:
@@ -1450,8 +1594,8 @@ NONE
#include <sys/stat.h>
int fchmod(
- int fildes,
- mode_t mode
+int fildes,
+mode_t mode
);
@end example
@end ifset
@@ -1488,11 +1632,11 @@ A file or directory does no exist.
Insufficient kernel memory was avaliable.
@item ENOTDIR
-A component of the specified pathname was not a directory when a
+A component of the specified pathname was not a directory when a
directory was expected.
@item EPERM
-The effective UID does not match the owner of the file, and is not
+The effective UID does not match the owner of the file, and is not
zero
@item EROFS
@@ -1501,16 +1645,22 @@ Read-only file system
@subheading DESCRIPTION:
-The mode of the file given by @code{path} or referenced by
-@code{filedes} is changed.
+The mode of the file given by @code{path} or referenced by
+@code{filedes} is changed.
@subheading NOTES:
NONE
+@c
+@c
+@c
@page
@subsection getdents - Get directory entries
+@findex getdents
+@cindex get directory entries
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -1520,9 +1670,9 @@ NONE
#include <linux/unistd.h>
long getdents(
- int dd_fd,
- char *dd_buf,
- int dd_len
+int dd_fd,
+char *dd_buf,
+int dd_len
);
@end example
@end ifset
@@ -1532,8 +1682,8 @@ long getdents(
@subheading STATUS CODES:
-A successful call to @code{getdents} returns th the number of bytes read.
-On end of directory, 0 is returned. When an error occurs, -1 is returned,
+A successful call to @code{getdents} returns th the number of bytes read.
+On end of directory, 0 is returned. When an error occurs, -1 is returned,
and @code{errno} is set appropriately.
@table @b
@@ -1557,16 +1707,22 @@ File descriptor does not refer to a directory.
@subheading DESCRIPTION:
@code{getdents} reads several @code{dirent} structures from the directory
-pointed by @code{fd} into the memory area pointed to by @code{dirp}. The
-parameter @code{count} is the size of the memory area.
+pointed by @code{fd} into the memory area pointed to by @code{dirp}. The
+parameter @code{count} is the size of the memory area.
@subheading NOTES:
NONE
+@c
+@c
+@c
@page
@subsection chown - Changes the owner and/or group of a file.
+@findex chown
+@cindex changes the owner and/or group of a file.
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -1575,9 +1731,9 @@ NONE
#include <unistd.h>
int chown(
- const char *path,
- uid_t owner,
- gid_t group
+const char *path,
+uid_t owner,
+gid_t group
);
@end example
@end ifset
@@ -1606,7 +1762,7 @@ A component of the specified pathname was not a directory when a directory
was expected.
@item EPERM
-Operation is not permitted. Process does not have the appropriate priviledges
+Operation is not permitted. Process does not have the appropriate priviledges
or permissions to perform the requested operations.
@item EROFS
@@ -1616,27 +1772,33 @@ Read-only file system.
@subheading DESCRIPTION:
-The user ID and group ID of the file named by @code{path} are set to
+The user ID and group ID of the file named by @code{path} are set to
@code{owner} and @code{path}, respectively.
For regular files, the set group ID (S_ISGID) and set user ID (S_ISUID)
bits are cleared.
Some systems consider it a security violation to allow the owner of a file to
-be changed, If users are billed for disk space usage, loaning a file to
-another user could result in incorrect billing. The @code{chown()} function
-may be restricted to privileged users for some or all files. The group ID can
+be changed, If users are billed for disk space usage, loaning a file to
+another user could result in incorrect billing. The @code{chown()} function
+may be restricted to privileged users for some or all files. The group ID can
still be changed to one of the supplementary group IDs.
@subheading NOTES:
-This function may be restricted for some file. The @code{pathconf} function
+This function may be restricted for some file. The @code{pathconf} function
can be used to test the @code{_PC_CHOWN_RESTRICTED} flag.
+@c
+@c
+@c
@page
-@subsection utime - Change access and/or modification times of an inode
+@subsection utime - Change access and/or modification times of an inode
+
+@findex utime
+@cindex change access and/or modification times of an inode
@subheading CALLING SEQUENCE:
@@ -1645,8 +1807,8 @@ can be used to test the @code{_PC_CHOWN_RESTRICTED} flag.
#include <sys/types.h>
int utime(
- const char *filename,
- struct utimbuf *buf
+const char *filename,
+struct utimbuf *buf
);
@end example
@end ifset
@@ -1669,16 +1831,22 @@ Permission to write the file is denied
@code{Utime} changes the access and modification times of the inode
specified by @code{filename} to the @code{actime} and @code{modtime}
-fields of @code{buf} respectively. If @code{buf} is NULL, then the
-access and modification times of the file are set to the current time.
+fields of @code{buf} respectively. If @code{buf} is NULL, then the
+access and modification times of the file are set to the current time.
@subheading NOTES:
NONE
+@c
+@c
+@c
@page
@subsection ftruncate - truncate a file to a specified length
+@findex ftruncate
+@cindex truncate a file to a specified length
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -1686,8 +1854,8 @@ NONE
#include <unistd.h>
int ftrunctate(
- int fd,
- size_t length
+int fd,
+size_t length
);
@end example
@end ifset
@@ -1718,7 +1886,7 @@ The named file is not writable by the user.
Search permission is denied for a component of the path prefix.
@item ELOOP
-Too many symbolic links were encountered in translating the
+Too many symbolic links were encountered in translating the
pathname
@item EISDIR
@@ -1728,7 +1896,7 @@ The named file is a directory.
The named file resides on a read-only file system
@item ETXTBSY
-The file is a pure procedure (shared text) file that is being
+The file is a pure procedure (shared text) file that is being
executed
@item EIO
@@ -1744,18 +1912,24 @@ The @code{fd} is not a valid descriptor.
@subheading DESCRIPTION:
-@code{truncate()} causes the file named by @code{path} or referenced by
-@code{fd} to be truncated to at most @code{length} bytes in size. If the
-file previously was larger than this size, the extra data is lost. With
+@code{truncate()} causes the file named by @code{path} or referenced by
+@code{fd} to be truncated to at most @code{length} bytes in size. If the
+file previously was larger than this size, the extra data is lost. With
@code{ftruncate()}, the file must be open for writing.
@subheading NOTES:
NONE
+@c
+@c
+@c
@page
@subsection truncate - truncate a file to a specified length
+@findex truncate
+@cindex truncate a file to a specified length
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -1763,8 +1937,8 @@ NONE
#include <unistd.h>
int trunctate(
- const char *path,
- size_t length
+const char *path,
+size_t length
);
@end example
@end ifset
@@ -1795,7 +1969,7 @@ The named file is not writable by the user.
Search permission is denied for a component of the path prefix.
@item ELOOP
-Too many symbolic links were encountered in translating the
+Too many symbolic links were encountered in translating the
pathname
@item EISDIR
@@ -1805,7 +1979,7 @@ The named file is a directory.
The named file resides on a read-only file system
@item ETXTBSY
-The file is a pure procedure (shared text) file that is being
+The file is a pure procedure (shared text) file that is being
executed
@item EIO
@@ -1821,18 +1995,24 @@ The @code{fd} is not a valid descriptor.
@subheading DESCRIPTION:
-@code{truncate()} causes the file named by @code{path} or referenced by
-@code{fd} to be truncated to at most @code{length} bytes in size. If the
-file previously was larger than this size, the extra data is lost. With
+@code{truncate()} causes the file named by @code{path} or referenced by
+@code{fd} to be truncated to at most @code{length} bytes in size. If the
+file previously was larger than this size, the extra data is lost. With
@code{ftruncate()}, the file must be open for writing.
@subheading NOTES:
NONE
+@c
+@c
+@c
@page
@subsection pathconf - Gets configuration values for files
+@findex pathconf
+@cindex gets configuration values for files
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -1840,8 +2020,8 @@ NONE
#include <unistd.h>
int pathconf(
- const char *path,
- int name
+const char *path,
+int name
);
@end example
@end ifset
@@ -1866,7 +2046,7 @@ is in effect.
A file or directory does not exist
@item ENOTDIR
-A component of the specified @code{path} was not a directory whan a
+A component of the specified @code{path} was not a directory whan a
directory was expected.
@end table
@@ -1880,51 +2060,57 @@ The possible values for @code{name} are:
@table @b
@item _PC_LINK_MAX
-returns the maximum number of links to the file. If @code{filedes} or
+returns the maximum number of links to the file. If @code{filedes} or
@code{path} refer to a directory, then the value applies to the whole
-directory. The corresponding macro is @code{_POSIX_LINK_MAX}.
+directory. The corresponding macro is @code{_POSIX_LINK_MAX}.
@item _PC_MAX_CANON
-returns the maximum length of a formatted input line, where @code{filedes}
-or @code{path} must refer to a terminal. The corresponding macro is
+returns the maximum length of a formatted input line, where @code{filedes}
+or @code{path} must refer to a terminal. The corresponding macro is
@code{_POSIX_MAX_CANON}.
@item _PC_MAX_INPUT
-returns the maximum length of an input line, where @code{filedes} or
-@code{path} must refer to a terminal. The corresponding macro is
+returns the maximum length of an input line, where @code{filedes} or
+@code{path} must refer to a terminal. The corresponding macro is
@code{_POSIX_MAX_INPUT}.
@item _PC_NAME_MAX
-returns the maximum length of a filename in the directory @code{path} or
-@code{filedes}. The process is allowed to create. The corresponding macro
+returns the maximum length of a filename in the directory @code{path} or
+@code{filedes}. The process is allowed to create. The corresponding macro
is @code{_POSIX_NAME_MAX}.
@item _PC_PATH_MAX
-returns the maximum length of a relative pathname when @code{path} or
-@code{filedes} is the current working directory. The corresponding macro
+returns the maximum length of a relative pathname when @code{path} or
+@code{filedes} is the current working directory. The corresponding macro
is @code{_POSIX_PATH_MAX}.
@item _PC_PIPE_BUF
-returns the size of the pipe buffer, where @code{filedes} must refer to a
-pipe or FIFO and @code{path} must refer to a FIFO. The corresponding macro
+returns the size of the pipe buffer, where @code{filedes} must refer to a
+pipe or FIFO and @code{path} must refer to a FIFO. The corresponding macro
is @code{_POSIX_PIPE_BUF}.
@item _PC_CHOWN_RESTRICTED
-returns nonzero if the chown(2) call may not be used on this file. If
-@code{filedes} or @code{path} refer to a directory, then this applies to all
-files in that directory. The corresponding macro is
+returns nonzero if the chown(2) call may not be used on this file. If
+@code{filedes} or @code{path} refer to a directory, then this applies to all
+files in that directory. The corresponding macro is
@code{_POSIX_CHOWN_RESTRICTED}.
@end table
@subheading NOTES:
-Files with name lengths longer than the value returned for @code{name} equal
+Files with name lengths longer than the value returned for @code{name} equal
@code{_PC_NAME_MAX} may exist in the given directory.
+@c
+@c
+@c
@page
@subsection fpathconf - Gets configuration values for files
+@findex fpathconf
+@cindex gets configuration values for files
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -1932,8 +2118,8 @@ Files with name lengths longer than the value returned for @code{name} equal
#include <unistd.h>
int fpathconf(
- int filedes,
- int name
+int filedes,
+int name
);
@end example
@end ifset
@@ -1958,7 +2144,7 @@ is in effect.
A file or directory does not exist
@item ENOTDIR
-A component of the specified @code{path} was not a directory whan a
+A component of the specified @code{path} was not a directory whan a
directory was expected.
@end table
@@ -1973,39 +2159,39 @@ The possible values for name are:
@table @b
@item _PC_LINK_MAX
-returns the maximum number of links to the file. If @code{filedes} or
+returns the maximum number of links to the file. If @code{filedes} or
@code{path} refer to a directory, then the value applies to the whole
-directory. The corresponding macro is _POSIX_LINK_MAX.
+directory. The corresponding macro is _POSIX_LINK_MAX.
@item _PC_MAX_CANON
-returns the maximum length of a formatted input line, where @code{filedes}
-or @code{path} must refer to a terminal. The corresponding macro is
+returns the maximum length of a formatted input line, where @code{filedes}
+or @code{path} must refer to a terminal. The corresponding macro is
@code{_POSIX_MAX_CANON}.
@item _PC_MAX_INPUT
-returns the maximum length of an input line, where @code{filedes} or
-@code{path} must refer to a terminal. The corresponding macro is
+returns the maximum length of an input line, where @code{filedes} or
+@code{path} must refer to a terminal. The corresponding macro is
@code{_POSIX_MAX_INPUT}.
@item _PC_NAME_MAX
-returns the maximum length of a filename in the directory @code{path} or
-@code{filedes}. The process is allowed to create. The corresponding macro
+returns the maximum length of a filename in the directory @code{path} or
+@code{filedes}. The process is allowed to create. The corresponding macro
is @code{_POSIX_NAME_MAX}.
@item _PC_PATH_MAX
-returns the maximum length of a relative pathname when @code{path} or
-@code{filedes} is the current working directory. The corresponding macro
+returns the maximum length of a relative pathname when @code{path} or
+@code{filedes} is the current working directory. The corresponding macro
is @code{_POSIX_PATH_MAX}.
@item _PC_PIPE_BUF
-returns the size of the pipe buffer, where @code{filedes} must refer to a
-pipe or FIFO and @code{path} must refer to a FIFO. The corresponding macro
+returns the size of the pipe buffer, where @code{filedes} must refer to a
+pipe or FIFO and @code{path} must refer to a FIFO. The corresponding macro
is @code{_POSIX_PIPE_BUF}.
@item _PC_CHOWN_RESTRICTED
-returns nonzero if the @code{chown()} call may not be used on this file. If
-@code{filedes} or @code{path} refer to a directory, then this applies to all
-files in that directory. The corresponding macro is
+returns nonzero if the @code{chown()} call may not be used on this file. If
+@code{filedes} or @code{path} refer to a directory, then this applies to all
+files in that directory. The corresponding macro is
@code{_POSIX_CHOWN_RESTRICTED}.
@end table
@@ -2014,9 +2200,15 @@ files in that directory. The corresponding macro is
NONE
+@c
+@c
+@c
@page
@subsection mknod - create a directory
+@findex mknod
+@cindex create a directory
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -2027,9 +2219,9 @@ NONE
#include <sys/stat.h>
long mknod(
- const char *pathname,
- mode_t mode,
- dev_t dev
+const char *pathname,
+mode_t mode,
+dev_t dev
);
@end example
@end ifset
@@ -2039,7 +2231,7 @@ long mknod(
@subheading STATUS CODES:
-@code{mknod} returns zero on success, or -1 if an error occurred (in which case,
+@code{mknod} returns zero on success, or -1 if an error occurred (in which case,
errno is set appropriately).
@table @b
@@ -2078,21 +2270,21 @@ named pipe) named @code{pathname}, specified by @code{mode} and @code{dev}.
It should be a combination (using bitwise OR) of one of the file types listed
below and the permissions for the new node.
-The permissions are modified by the process's @code{umask} in the usual way: the
+The permissions are modified by the process's @code{umask} in the usual way: the
permissions of the created node are @code{(mode & ~umask)}.
-The file type should be one of @code{S_IFREG}, @code{S_IFCHR}, @code{S_IFBLK} and
-@code{S_IFIFO} to specify a normal file (which will be created empty), character
-special file, block special file or FIFO (named pipe), respectively, or zero, which
+The file type should be one of @code{S_IFREG}, @code{S_IFCHR}, @code{S_IFBLK} and
+@code{S_IFIFO} to specify a normal file (which will be created empty), character
+special file, block special file or FIFO (named pipe), respectively, or zero, which
will create a normal file.
-If the file type is @code{S_IFCHR} or @code{S_IFBLK} then @code{dev} specifies the major
+If the file type is @code{S_IFCHR} or @code{S_IFBLK} then @code{dev} specifies the major
and minor numbers of the newly created device special file; otherwise it is ignored.
-The newly created node will be owned by the effective uid of the process. If the
+The newly created node will be owned by the effective uid of the process. If the
directory containing the node has the set group id bit set, or if the filesystem
is mounted with BSD group semantics, the new node will inherit the group ownership
-from its parent directory; otherwise it will be owned by the effective gid of the
+from its parent directory; otherwise it will be owned by the effective gid of the
process.
diff --git a/doc/posix_users/io.t b/doc/posix_users/io.t
index ad527aede5..b21abea837 100644
--- a/doc/posix_users/io.t
+++ b/doc/posix_users/io.t
@@ -1,9 +1,9 @@
@c
-@c COPYRIGHT (c) 1988-1998.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
+@c COPYRIGHT (c) 1988-1998.
+@c On-Line Applications Research Corporation (OAR).
+@c All rights reserved.
@c
-@c $Id$
+@c $Id$
@c
@chapter Input and Output Primitives Manager
@@ -52,9 +52,15 @@ A subsection is dedicated to each of this manager's directives
and describes the calling sequence, related constants, usage,
and status codes.
+@c
+@c
+@c
@page
@subsection pipe - Create an Inter-Process Channel
+@findex pipe
+@cindex create an inter
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -79,12 +85,18 @@ The
@subheading NOTES:
-This routine is not currently supported by RTEMS but could be
+This routine is not currently supported by RTEMS but could be
in a future version.
+@c
+@c
+@c
@page
@subsection dup - Duplicates an open file descriptor
+@findex dup
+@cindex duplicates an open file descriptor
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -92,7 +104,7 @@ in a future version.
#include <unistd.h>
int dup(
- int fildes
+int fildes
);
@end example
@end ifset
@@ -110,23 +122,29 @@ Invalid file descriptor.
Function was interrupted by a signal.
@item EMFILE
-The process already has the maximum number of file descriptors open
+The process already has the maximum number of file descriptors open
and tried to open a new one.
@end table
@subheading DESCRIPTION:
-The @code{dup} function returns the lowest numbered available file
-descriptor. This new desciptor refers to the same open file as the
+The @code{dup} function returns the lowest numbered available file
+descriptor. This new desciptor refers to the same open file as the
original descriptor and shares any locks.
-@subheading NOTES:
+@subheading NOTES:
NONE
+@c
+@c
+@c
@page
@subsection dup2 - Duplicates an open file descriptor
+@findex dup2
+@cindex duplicates an open file descriptor
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -134,8 +152,8 @@ NONE
#include <unistd.h>
int dup2(
- int fildes,
- int fildes2
+int fildes,
+int fildes2
);
@end example
@end ifset
@@ -153,7 +171,7 @@ Invalid file descriptor.
Function was interrupted by a signal.
@item EMFILE
-The process already has the maximum number of file descriptors open
+The process already has the maximum number of file descriptors open
and tried to open a new one.
@end table
@@ -161,16 +179,22 @@ and tried to open a new one.
@code{Dup2} creates a copy of the file descriptor @code{oldfd}.
-The old and new descriptors may be used interchangeably. They share locks, file
+The old and new descriptors may be used interchangeably. They share locks, file
position pointers and flags; for example, if the file position is modified by using
@code{lseek} on one of the descriptors, the position is also changed for the other.
-@subheading NOTES:
+@subheading NOTES:
NONE
+@c
+@c
+@c
@page
-@subsection close - Closes a file.
+@subsection close - Closes a file.
+
+@findex close
+@cindex closes a file.
@subheading CALLING SEQUENCE:
@@ -179,7 +203,7 @@ NONE
#include <unistd.h>
int close(
- int fildes
+int fildes
);
@end example
@end ifset
@@ -200,18 +224,24 @@ Function was interrupted by a signal.
@subheading DESCRIPTION:
The @code{close()} function deallocates the file descriptor named by
-@code{fildes} and makes it available for reuse. All outstanding
+@code{fildes} and makes it available for reuse. All outstanding
record locks owned by this process for the file are unlocked.
@subheading NOTES:
-A signal can interrupt the @code{close()} function. In that case,
-@code{close()} returns -1 with @code{errno} set to EINTR. The file
+A signal can interrupt the @code{close()} function. In that case,
+@code{close()} returns -1 with @code{errno} set to EINTR. The file
may or may not be closed.
+@c
+@c
+@c
@page
@subsection read - Reads from a file.
+@findex read
+@cindex reads from a file.
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -219,9 +249,9 @@ may or may not be closed.
#include <unistd.h>
int read(
- int fildes,
- void *buf,
- unsigned int nbyte
+int fildes,
+void *buf,
+unsigned int nbyte
);
@end example
@end ifset
@@ -233,7 +263,7 @@ int read(
On error, this routine returns -1 and sets @code{errno} to one of
the following:
-
+
@table @b
@item EAGAIN
The O_NONBLOCK flag is set for a file descriptor and the process
@@ -252,7 +282,7 @@ Input or output error
@subheading DESCRIPTION:
-The @code{read()} function reads @code{nbyte} bytes from the file
+The @code{read()} function reads @code{nbyte} bytes from the file
associated with @code{fildes} into the buffer pointed to by @code{buf}.
The @code{read()} function returns the number of bytes actually read
@@ -274,7 +304,7 @@ When attempting to read from any empty pipe or FIFO:
@itemize @bullet
-@item If no process has the pipe open for writing, zero is returned to
+@item If no process has the pipe open for writing, zero is returned to
indicate end-of-file.
@item If some process has the pipe open for writing and O_NONBLOCK is set,
@@ -293,7 +323,7 @@ is available.
@item If O_NONBLOCK is set, -1 is returned and @code{errno} is set to EAGAIN.
-@item If O_NONBLOCK is clear, @code{read()} waits for some data to become
+@item If O_NONBLOCK is clear, @code{read()} waits for some data to become
available.
@item The O_NONBLOCK flag is ignored if data is available.
@@ -304,9 +334,15 @@ available.
NONE
+@c
+@c
+@c
@page
@subsection write - Writes to a file
+@findex write
+@cindex writes to a file
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -314,9 +350,9 @@ NONE
#include <unistd.h>
int write(
- int fildes,
- const void *buf,
- unsigned int nbytes
+int fildes,
+const void *buf,
+unsigned int nbytes
);
@end example
@end ifset
@@ -335,7 +371,7 @@ would be delayed in the I/O operation.
Invalid file descriptor
@item EFBIG
-An attempt was made to write to a file that exceeds the maximum file
+An attempt was made to write to a file that exceeds the maximum file
size
@item EINTR
@@ -358,20 +394,26 @@ The @code{write()} function writes @code{nbyte} from the array pointed
to by @code{buf} into the file associated with @code{fildes}.
If @code{nybte} is zero and the file is a regular file, the @code{write()}
-function returns zero and has no other effect. If @code{nbyte} is zero
+function returns zero and has no other effect. If @code{nbyte} is zero
and the file is a special file, te results are not portable.
-The @code{write()} function returns the number of bytes written. This
-number will be less than @code{nbytes} if there is an error. It will never
+The @code{write()} function returns the number of bytes written. This
+number will be less than @code{nbytes} if there is an error. It will never
be greater than @code{nbytes}.
-@subheading NOTES:
+@subheading NOTES:
NONE
+@c
+@c
+@c
@page
@subsection fcntl - Manipulates an open file descriptor
+@findex fcntl
+@cindex manipulates an open file descriptor
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -381,8 +423,8 @@ NONE
#include <unistd.h>
int fcntl(
- int fildes,
- int cmd
+int fildes,
+int cmd
);
@end example
@end ifset
@@ -424,48 +466,48 @@ No locks available
@subheading DESCRIPTION:
@code{fcntl()} performs one of various miscellaneous operations on
-@code{fd}. The operation in question is determined by @code{cmd}:
+@code{fd}. The operation in question is determined by @code{cmd}:
-@table @b
+@table @b
-@item F_DUPFD
+@item F_DUPFD
Makes @code{arg} be a copy of @code{fd}, closing @code{fd} first if necessary.
The same functionality can be more easily achieved by using @code{dup2()}.
-The old and new descriptors may be used interchangeably. They share locks,
-file position pointers and flags; for example, if the file position is
-modified by using @code{lseek()} on one of the descriptors, the position is
+The old and new descriptors may be used interchangeably. They share locks,
+file position pointers and flags; for example, if the file position is
+modified by using @code{lseek()} on one of the descriptors, the position is
also changed for the other.
-The two descriptors do not share the close-on-exec flag, however. The
-close-on-exec flag of the copy is off, meaning that it will be closed on
+The two descriptors do not share the close-on-exec flag, however. The
+close-on-exec flag of the copy is off, meaning that it will be closed on
exec.
On success, the new descriptor is returned.
-@item F_GETFD
-Read the close-on-exec flag. If the low-order bit is 0, the file will
+@item F_GETFD
+Read the close-on-exec flag. If the low-order bit is 0, the file will
remain open across exec, otherwise it will be closed.
-@item F_SETFD
-Set the close-on-exec flag to the value specified by @code{arg} (only the least
+@item F_SETFD
+Set the close-on-exec flag to the value specified by @code{arg} (only the least
significant bit is used).
-@item F_GETFL
+@item F_GETFL
Read the descriptor's flags (all flags (as set by open()) are returned).
-@item F_SETFL
-Set the descriptor's flags to the value specified by @code{arg}. Only
+@item F_SETFL
+Set the descriptor's flags to the value specified by @code{arg}. Only
@code{O_APPEND} and @code{O_NONBLOCK} may be set.
-The flags are shared between copies (made with @code{dup()} etc.) of the same
+The flags are shared between copies (made with @code{dup()} etc.) of the same
file descriptor.
The flags and their semantics are described in @code{open()}.
@item F_GETLK, F_SETLK and F_SETLKW
-Manage discretionary file locks. The third argument @code{arg} is a pointer to a
+Manage discretionary file locks. The third argument @code{arg} is a pointer to a
struct flock (that may be overwritten by this call).
@item F_GETLK
@@ -473,26 +515,26 @@ Return the flock structure that prevents us from obtaining the lock, or set the
@code{l_type} field of the lock to @code{F_UNLCK} if there is no obstruction.
@item F_SETLK
-The lock is set (when @code{l_type} is @code{F_RDLCK} or @code{F_WRLCK}) or
-cleared (when it is @code{F_UNLCK}. If lock is held by someone else, this
+The lock is set (when @code{l_type} is @code{F_RDLCK} or @code{F_WRLCK}) or
+cleared (when it is @code{F_UNLCK}. If lock is held by someone else, this
call returns -1 and sets @code{errno} to EACCES or EAGAIN.
-@item F_SETLKW
-Like @code{F_SETLK}, but instead of returning an error we wait for the lock to
+@item F_SETLKW
+Like @code{F_SETLK}, but instead of returning an error we wait for the lock to
be released.
-@item F_GETOWN
+@item F_GETOWN
Get the process ID (or process group) of the owner of a socket.
Process groups are returned as negative values.
-@item F_SETOWN
+@item F_SETOWN
Set the process or process group that owns a socket.
For these commands, ownership means receiving @code{SIGIO} or @code{SIGURG}
signals.
-Process groups are specified using negative values.
+Process groups are specified using negative values.
@end table
@@ -501,9 +543,15 @@ Process groups are specified using negative values.
The errors returned by @code{dup2} are different from those returned by
@code{F_DUPFD}.
+@c
+@c
+@c
@page
@subsection lseek - Reposition read/write file offset
+@findex lseek
+@cindex reposition read/write file offset
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -512,9 +560,9 @@ The errors returned by @code{dup2} are different from those returned by
#include <unistd.h>
int lseek(
- int fildes,
- off_t offset,
- int whence
+int fildes,
+off_t offset,
+int whence
);
@end example
@end ifset
@@ -529,30 +577,30 @@ int lseek(
@code{Fildes} is not an open file descriptor.
@item ESPIPE
-@code{Fildes} is associated with a pipe, socket or FIFO.
+@code{Fildes} is associated with a pipe, socket or FIFO.
@item EINVAL
-@code{Whence} is not a proper value.
+@code{Whence} is not a proper value.
@end table
@subheading DESCRIPTION:
The @code{lseek} function repositions the offset of the file descriptor
-@code{fildes} to the argument offset according to the directive whence.
+@code{fildes} to the argument offset according to the directive whence.
The argument @code{fildes} must be an open file descriptor. @code{Lseek}
repositions the file pointer fildes as follows:
@itemize @bullet
-@item
+@item
If @code{whence} is SEEK_SET, the offset is set to @code{offset} bytes.
-@item
+@item
If @code{whence} is SEEK_CUR, the offset is set to its current location
plus offset bytes.
-@item
+@item
If @code{whence} is SEEK_END, the offset is set to the size of the
file plus @code{offset} bytes.
@@ -563,22 +611,28 @@ of the existing end-of-file of the file. If data is later written at this
point, subsequent reads of the data in the gap return bytes of zeros
(until data is actually written into the gap).
-Some devices are incapable of seeking. The value of the pointer associated
+Some devices are incapable of seeking. The value of the pointer associated
with such a device is undefined.
-@subheading NOTES:
+@subheading NOTES:
NONE
+@c
+@c
+@c
@page
@subsection fsync - Synchronize file complete in-core state with that on disk
+@findex fsync
+@cindex synchronize file complete in
+
@subheading CALLING SEQUENCE:
@ifset is-C
@example
int fsync(
- int fd
+int fd
);
@end example
@end ifset
@@ -588,7 +642,7 @@ int fsync(
@subheading STATUS CODES:
-On success, zero is returned. On error, -1 is returned, and @code{errno}
+On success, zero is returned. On error, -1 is returned, and @code{errno}
is set appropriately.
@table @b
@@ -614,15 +668,21 @@ An error occurred during synchronization
NONE
+@c
+@c
+@c
@page
-@subsection fdatasync - Synchronize file in-core data with that on disk.
+@subsection fdatasync - Synchronize file in-core data with that on disk.
+
+@findex fdatasync
+@cindex synchronize file in
@subheading CALLING SEQUENCE:
@ifset is-C
@example
int fdatasync(
- int fd
+int fd
);
@end example
@end ifset
@@ -632,7 +692,7 @@ int fdatasync(
@subheading STATUS CODES:
-On success, zero is returned. On error, -1 is returned, and @code{errno} is
+On success, zero is returned. On error, -1 is returned, and @code{errno} is
set appropriately.
@table @b
@@ -653,24 +713,30 @@ An error occurred during synchronization.
@subheading DESCRIPTION:
@code{fdatasync} flushes all data buffers of a file to disk (before the system call
-returns). It resembles @code{fsync} but is not required to update the metadata such
+returns). It resembles @code{fsync} but is not required to update the metadata such
as access time.
Applications that access databases or log files often write a tiny data fragment
-(e.g., one line in a log file) and then call @code{fsync} immediately in order to
-ensure that the written data is physically stored on the harddisk. Unfortunately,
-fsync will always initiate two write operations: one for the newly written data and
-another one in order to update the modification time stored in the inode. If the
-modification time is not a part of the transaction concept @code{fdatasync} can be
+(e.g., one line in a log file) and then call @code{fsync} immediately in order to
+ensure that the written data is physically stored on the harddisk. Unfortunately,
+fsync will always initiate two write operations: one for the newly written data and
+another one in order to update the modification time stored in the inode. If the
+modification time is not a part of the transaction concept @code{fdatasync} can be
used to avoid unnecessary inode disk write operations.
@subheading NOTES:
NONE
+@c
+@c
+@c
@page
@subsection mount - Mount a file system
+@findex mount
+@cindex mount a file system
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -679,11 +745,11 @@ NONE
#include <linux/fs.h>
int mount(
- const char *specialfile,
- const char * dir,
- const char * filesystemtype,
- unsigned long rwflag,
- const void * data
+const char *specialfile,
+const char CVS Makefile cancel.t clock.t cond.t cspecific.t device.t files.t io.t j key.t memorymgmt.t message.t mutex.t nodesc nodescr posix_users.cps posix_users.fns posix_users.texi preface.texi procenv.t process.t psxmsg.t sched.t semaphores.t signal.t systemdb.t thread.t dir,
+const char CVS Makefile cancel.t clock.t cond.t cspecific.t device.t files.t io.t j key.t memorymgmt.t message.t mutex.t nodesc nodescr posix_users.cps posix_users.fns posix_users.texi preface.texi procenv.t process.t psxmsg.t sched.t semaphores.t signal.t systemdb.t thread.t filesystemtype,
+unsigned long rwflag,
+const void CVS Makefile cancel.t clock.t cond.t cspecific.t device.t files.t io.t j key.t memorymgmt.t message.t mutex.t nodesc nodescr posix_users.cps posix_users.fns posix_users.texi preface.texi procenv.t process.t psxmsg.t sched.t semaphores.t signal.t systemdb.t thread.t data
);
@end example
@end ifset
@@ -704,14 +770,14 @@ The user is not the super-user.
@code{specialfile} is not a block device (if a device was required).
@item EBUSY
-@code{specialfile} is already mounted. Or, it cannot be remounted
-read-only, because it still holds files open for writing. Or, it
+@code{specialfile} is already mounted. Or, it cannot be remounted
+read-only, because it still holds files open for writing. Or, it
cannot be mounted on @code{dir} because @code{dir} is still busy
(it is the working directory of some task, the mount point of another
device, has open files, etc.).
@item EINVAL
-@code{specialfile} had an invalid superblock. Or, a remount was
+@code{specialfile} had an invalid superblock. Or, a remount was
attempted, while @code{specialfile} was not already mounted on @code{dir}.
Or, an umount was attempted, while @code{dir} was not a mount point.
@@ -728,8 +794,8 @@ A pathname was longer than MAXPATHLEN.
A pathname was empty or had a nonexistent component.
@item EACCES
-A component of a path was not searchable. Or, mounting a read-only
-filesystem was attempted without giving the MS_RDONLY flag. Or, the
+A component of a path was not searchable. Or, mounting a read-only
+filesystem was attempted without giving the MS_RDONLY flag. Or, the
block device @code{specialfile} is located on a filesystem mounted with
the MS_NODEV option.
@@ -739,7 +805,7 @@ range.
@item EMFILE
(In case no block device is required:) Table of dummy devices is full.
-
+
@end table
@subheading DESCRIPTION:
@@ -750,11 +816,11 @@ range.
Only the super-user may mount filesystems.
The @code{filesystemtype} argument may take one of the values listed in
-/proc/filesystems (link "minix", "ext2", "msdos", "proc", "nfs",
+/proc/filesystems (link "minix", "ext2", "msdos", "proc", "nfs",
"iso9660" etc.).
The @code{rwflag} argument has the magic number 0xCOED in the top 16 bits,
-and various mount flags in the low order 16 bits. If the magic number is
+and various mount flags in the low order 16 bits. If the magic number is
absent, then the last two arguments are not used.
The @code{data} argument is interpreted by the different file systems.
@@ -763,9 +829,15 @@ The @code{data} argument is interpreted by the different file systems.
NONE
+@c
+@c
+@c
@page
@subsection umount - Umount file systems
+@findex umount
+@cindex umount file systems
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -774,7 +846,7 @@ NONE
#include <linux/fs.h>
int umount(
- const char *specialfile
+const char *specialfile
);
@end example
@end ifset
@@ -795,14 +867,14 @@ The user is not the super-user.
@code{Specialfile} is not a block device (if a device was required).
@item EBUSY
-@code{Specialfile} is already mounted. Or, it cannot be remounted
-read-only, because it still holds files open for writing. Or, it
+@code{Specialfile} is already mounted. Or, it cannot be remounted
+read-only, because it still holds files open for writing. Or, it
cannot be mounted on @code{dir} because @code{dir} is still busy
(it is the working directory of some task, the mount point of another
device, has open files, etc.).
@item EINVAL
-@code{specialfile} had an invalid superblock. Or, a remount was
+@code{specialfile} had an invalid superblock. Or, a remount was
attempted, while @code{specialfile} was not already mounted on @code{dir}.
Or, an umount was attempted, while @code{dir} was not a mount point.
@@ -819,8 +891,8 @@ A pathname was longer than MAXPATHLEN.
A pathname was empty or had a nonexistent component.
@item EACCES
-A component of a path was not searchable. Or, mounting a read-only
-filesystem was attempted without giving the MS_RDONLY flag. Or, the
+A component of a path was not searchable. Or, mounting a read-only
+filesystem was attempted without giving the MS_RDONLY flag. Or, the
block device @code{specialfile} is located on a filesystem mounted with
the MS_NODEV option.
@@ -840,13 +912,19 @@ by @code{specialfile} or @code{dir}.
Only the super-user may umount filesystems.
-@subheading NOTES:
+@subheading NOTES:
NONE
+@c
+@c
+@c
@page
@subsection aio_read - Asynchronous Read
+@findex aio_read
+@cindex asynchronous read
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -871,12 +949,18 @@ The
@subheading NOTES:
-This routine is not currently supported by RTEMS but could be
+This routine is not currently supported by RTEMS but could be
in a future version.
+@c
+@c
+@c
@page
@subsection aio_write - Asynchronous Write
+@findex aio_write
+@cindex asynchronous write
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -901,12 +985,18 @@ The
@subheading NOTES:
-This routine is not currently supported by RTEMS but could be
+This routine is not currently supported by RTEMS but could be
in a future version.
+@c
+@c
+@c
@page
@subsection lio_listio - List Directed I/O
+@findex lio_listio
+@cindex list directed i/o
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -931,12 +1021,18 @@ The
@subheading NOTES:
-This routine is not currently supported by RTEMS but could be
+This routine is not currently supported by RTEMS but could be
in a future version.
+@c
+@c
+@c
@page
@subsection aio_error - Retrieve Error Status of Asynchronous I/O Operation
+@findex aio_error
+@cindex retrieve error status of asynchronous i/o operation
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -961,12 +1057,18 @@ The
@subheading NOTES:
-This routine is not currently supported by RTEMS but could be
+This routine is not currently supported by RTEMS but could be
in a future version.
+@c
+@c
+@c
@page
@subsection aio_return - Retrieve Return Status Asynchronous I/O Operation
+@findex aio_return
+@cindex retrieve return status asynchronous i/o operation
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -991,12 +1093,18 @@ The
@subheading NOTES:
-This routine is not currently supported by RTEMS but could be
+This routine is not currently supported by RTEMS but could be
in a future version.
+@c
+@c
+@c
@page
@subsection aio_cancel - Cancel Asynchronous I/O Request
+@findex aio_cancel
+@cindex cancel asynchronous i/o request
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -1021,12 +1129,18 @@ The
@subheading NOTES:
-This routine is not currently supported by RTEMS but could be
+This routine is not currently supported by RTEMS but could be
in a future version.
+@c
+@c
+@c
@page
@subsection aio_suspend - Wait for Asynchronous I/O Request
+@findex aio_suspend
+@cindex wait for asynchronous i/o request
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -1051,12 +1165,18 @@ The
@subheading NOTES:
-This routine is not currently supported by RTEMS but could be
+This routine is not currently supported by RTEMS but could be
in a future version.
+@c
+@c
+@c
@page
@subsection aio_fsync - Asynchronous File Synchronization
+@findex aio_fsync
+@cindex asynchronous file synchronization
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -1081,5 +1201,5 @@ The
@subheading NOTES:
-This routine is not currently supported by RTEMS but could be
+This routine is not currently supported by RTEMS but could be
in a future version.
diff --git a/doc/posix_users/key.t b/doc/posix_users/key.t
index 58e34bb259..7c5068c110 100644
--- a/doc/posix_users/key.t
+++ b/doc/posix_users/key.t
@@ -1,9 +1,9 @@
@c
-@c COPYRIGHT (c) 1988-1998.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
+@c COPYRIGHT (c) 1988-1998.
+@c On-Line Applications Research Corporation (OAR).
+@c All rights reserved.
@c
-@c $Id$
+@c $Id$
@c
@chapter Key Manager
@@ -36,6 +36,9 @@ A subsection is dedicated to each of this manager's directives
and describes the calling sequence, related constants, usage,
and status codes.
+@c
+@c
+@c
@page
@subsection pthread_key_create
@@ -45,8 +48,8 @@ and status codes.
#include <pthread.h>
int pthread_key_create(
- pthread_key_t *key,
- void (*destructor)( void * )
+pthread_key_t *key,
+void (*destructor)( void CVS Makefile cancel.t clock.t cond.t cspecific.t device.t files.t io.t j key.t memorymgmt.t message.t mutex.t nodesc nodescr posix_users.cps posix_users.fns posix_users.texi preface.texi procenv.t process.t psxmsg.t sched.t semaphores.t signal.t systemdb.t thread.t )
);
@end example
@@ -61,31 +64,37 @@ Insufficient memory exists to create the key.
@end table
+@c
+@c
+@c
@page
@subsection pthread_key_delete
-
+
@subheading CALLING SEQUENCE:
-
+
@example
#include <pthread.h>
-
+
int pthread_key_delete(
- pthread_key_t key,
+pthread_key_t key,
);
@end example
-
+
@subheading STATUS CODES:
-
+
@table @b
@item EINVAL
The key was invalid
-
+
@end table
@subheading DESCRIPTION:
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection pthread_setspecific
@@ -95,8 +104,8 @@ The key was invalid
#include <pthread.h>
int pthread_setspecific(
- pthread_key_t key,
- const void *value
+pthread_key_t key,
+const void *value
);
@end example
@@ -111,6 +120,9 @@ The specified key is invalid.
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection pthread_getspecific
@@ -120,7 +132,7 @@ The specified key is invalid.
#include <pthread.h>
void *pthread_getspecific(
- pthread_key_t key
+pthread_key_t key
);
@end example
diff --git a/doc/posix_users/memorymgmt.t b/doc/posix_users/memorymgmt.t
index ee5bbdb9a0..e141cf1f0f 100644
--- a/doc/posix_users/memorymgmt.t
+++ b/doc/posix_users/memorymgmt.t
@@ -1,16 +1,16 @@
@c
-@c COPYRIGHT (c) 1988-1998.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
+@c COPYRIGHT (c) 1988-1998.
+@c On-Line Applications Research Corporation (OAR).
+@c All rights reserved.
@c
-@c $Id$
+@c $Id$
@c
@chapter Memory Management Manager
@section Introduction
-The
+The
memory management manager is ...
The directives provided by the memory management manager are:
@@ -43,9 +43,15 @@ A subsection is dedicated to each of this manager's directives
and describes the calling sequence, related constants, usage,
and status codes.
+@c
+@c
+@c
@page
@subsection mlockall - Lock the Address Space of a Process
+@findex mlockall
+@cindex lock the address space of a process
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -70,9 +76,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection munlockall - Unlock the Address Space of a Process
+@findex munlockall
+@cindex unlock the address space of a process
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -97,9 +109,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection mlock - Lock a Range of the Process Address Space
+@findex mlock
+@cindex lock a range of the process address space
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -124,9 +142,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection munlock - Unlock a Range of the Process Address Space
+@findex munlock
+@cindex unlock a range of the process address space
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -151,9 +175,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection mmap - Map Process Addresses to a Memory Object
+@findex mmap
+@cindex map process addresses to a memory object
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -178,9 +208,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection munmap - Unmap Previously Mapped Addresses
+@findex munmap
+@cindex unmap previously mapped addresses
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -205,9 +241,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection mprotect - Change Memory Protection
+@findex mprotect
+@cindex change memory protection
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -232,9 +274,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection msync - Memory Object Synchronization
+@findex msync
+@cindex memory object synchronization
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -259,9 +307,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection shm_open - Open a Shared Memory Object
+@findex shm_open
+@cindex open a shared memory object
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -286,9 +340,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection shm_unlink - Remove a Shared Memory Object
+@findex shm_unlink
+@cindex remove a shared memory object
+
@subheading CALLING SEQUENCE:
@ifset is-C
diff --git a/doc/posix_users/message.t b/doc/posix_users/message.t
index eda4cf8f7b..8a7ad062a5 100644
--- a/doc/posix_users/message.t
+++ b/doc/posix_users/message.t
@@ -1,9 +1,9 @@
@c
-@c COPYRIGHT(c) 1988-1998.
-@c On-Line Applications Research Corporation(OAR).
-@c All rights reserved.
+@c COPYRIGHT(c) 1988-1998.
+@c On-Line Applications Research Corporation(OAR).
+@c All rights reserved.
@c
-@c $Id$
+@c $Id$
@c
@chapter Message Passing Manager
@@ -30,33 +30,33 @@ The directives provided by the message passing manager are:
@subsection Theory
-Message queues are named objects that operate with readers and writers.
-In addition, a message queue is a priority queue of discrete messages.
+Message queues are named objects that operate with readers and writers.
+In addition, a message queue is a priority queue of discrete messages.
POSIX message queues offer a certain, basic amount of application access
to, and control over, the message queue geometry that can be changed.
@subsection Messages
A message is a variable length buffer where information can be stored to
-support communication. The length of the message and the information
+support communication. The length of the message and the information
stored in that message are user-defined and can be actual data,
-pointer(s), or empty. There is a maximum acceptable length for a message
+pointer(s), or empty. There is a maximum acceptable length for a message
that is associated with each message queue.
@subsection Message Queues
-Message queues are named objects similar to the pipes of POSIX. They are
+Message queues are named objects similar to the pipes of POSIX. They are
a means of communicating data between multiple processes and for passing
-messages among tasks and ISRs. Message queues can contain a variable
-number of messages from 0 to an upper limit that is user defined. The
-maximum length of the message can be set on a per message queue basis.
+messages among tasks and ISRs. Message queues can contain a variable
+number of messages from 0 to an upper limit that is user defined. The
+maximum length of the message can be set on a per message queue basis.
Normally messages are sent and received from the message queue in FIFO
-order. However, messages can also be prioritized and a priority queue
-established for the passing of messages. Synchronization is needed when a
-task waits for a message to arrive at a queue. Also, a task may poll a
+order. However, messages can also be prioritized and a priority queue
+established for the passing of messages. Synchronization is needed when a
+task waits for a message to arrive at a queue. Also, a task may poll a
queue for the arrival of a message.
-The message queue descriptor mqd_t mq represents the message queue. It is
+The message queue descriptor mqd_t mq represents the message queue. It is
passed as an argument to all of the message queue functions.
@subsection Building a Message Queue Attribute Set
@@ -66,65 +66,65 @@ queue.
@example
@group
-/*
- * Create Message Queue (mq) Structure
- */
+/backit /backit~ /bin /boot /dev /etc /home /lib /lost+found /mnt /proc /root /sbin /tmp /usr /usr1 /usr2 /usr3 /var
+CVS Makefile cancel.t clock.t cond.t cspecific.t device.t files.t io.t j key.t memorymgmt.t message.t mutex.t nodesc nodescr posix_users.cps posix_users.fns posix_users.texi preface.texi procenv.t process.t psxmsg.t sched.t semaphores.t signal.t systemdb.t thread.t Create Message Queue (mq) Structure
+CVS/
typedef struct mq_attr@{
- long mq_flags; /* Message queue flags */
- long mq_maxmsg; /* Maximum number of messages for the queue */
- long mq_msgsize; /* Maximum message size */
- long mq_curmsgs; /* Number of messages currently queued */
+long mq_flags; /backit /backit~ /bin /boot /dev /etc /home /lib /lost+found /mnt /proc /root /sbin /tmp /usr /usr1 /usr2 /usr3 /var Message queue flags CVS/
+long mq_maxmsg; /backit /backit~ /bin /boot /dev /etc /home /lib /lost+found /mnt /proc /root /sbin /tmp /usr /usr1 /usr2 /usr3 /var Maximum number of messages for the queue CVS/
+long mq_msgsize; /backit /backit~ /bin /boot /dev /etc /home /lib /lost+found /mnt /proc /root /sbin /tmp /usr /usr1 /usr2 /usr3 /var Maximum message size CVS/
+long mq_curmsgs; /backit /backit~ /bin /boot /dev /etc /home /lib /lost+found /mnt /proc /root /sbin /tmp /usr /usr1 /usr2 /usr3 /var Number of messages currently queued CVS/
@};
@end group
@end example
All of these attributes are set when the message queue is created using
-mq_open. The mq_flags field is not used in the creation of a message
-queue, it is only used by mq_setattr and mq_getattr. The structure
+mq_open. The mq_flags field is not used in the creation of a message
+queue, it is only used by mq_setattr and mq_getattr. The structure
mq_attr is passed as an argument to mq_setattr and mq_getattr.
The mq_flags contain information affecting the behavior of the message
-queue. The O_NONBLOCK mq_flag is the only flag that is defined. In
+queue. The O_NONBLOCK mq_flag is the only flag that is defined. In
mq_setattr, the mq_flag can be set to dynamically change the blocking and
-non-blocking behavior of the message queue. If the non-block flag is set
+non-blocking behavior of the message queue. If the non-block flag is set
then the message queue is non-blocking, and requests to send and receive
-messages do not block waiting for resources. For a blocking message
+messages do not block waiting for resources. For a blocking message
queue, a request to send might have to wait for an empty message queue,
and a request to receive might have to wait for a message to arrive on the
queue. Both mq_maxmsg and mq_msgsize affect the sizing of the message
-queue. mq_maxmsg specifies how many messages the queue can hold at any
-one time. mq_msgsize specifies the size of any one message on the queue.
+queue. mq_maxmsg specifies how many messages the queue can hold at any
+one time. mq_msgsize specifies the size of any one message on the queue.
If either of these limits is exceeded, an error message results.
Upon return from mq_getattr, the mq_curmsgs is set according to the
-current state of the message queue. This specifies the number of messages
+current state of the message queue. This specifies the number of messages
currently on the queue.
@subsection Notification of a Message on the Queue
Every message queue has the ability to notify one (and only one) process
-whenever the queue's state changes from empty (0 messages) to nonempty.
+whenever the queue's state changes from empty (0 messages) to nonempty.
This means that the process does not have to block or constantly poll
-while it waits for a message. By calling mq_notify, you can attach a
-notification request to a message queue. When a message is received by an
+while it waits for a message. By calling mq_notify, you can attach a
+notification request to a message queue. When a message is received by an
empty queue, if there are no processes blocked and waiting for the
message, then the queue notifies the requesting process of a message
-arrival. There is only one signal sent by the message queue, after that
+arrival. There is only one signal sent by the message queue, after that
the notification request is de-registered and another process can attach
-its notification request. After receipt of a notification, a process must
+its notification request. After receipt of a notification, a process must
re-register if it wishes to be notified again.
If there is a process blocked and waiting for the message, that process
-gets the message, and notification is not sent. It is also possible for
+gets the message, and notification is not sent. It is also possible for
another process to receive the message after the notification is sent but
before the notified process has sent its receive request.
Only one process can have a notification request attached to a message
-queue at any one time. If another process attempts to register a
-notification request, it fails. You can de-register for a message queue
+queue at any one time. If another process attempts to register a
+notification request, it fails. You can de-register for a message queue
by passing a NULL to mq_notify, this removes any notification request
-attached to the queue. Whenever the message queue is closed, all
+attached to the queue. Whenever the message queue is closed, all
notification attachments are removed.
@section Operations
@@ -132,57 +132,57 @@ notification attachments are removed.
@subsection Opening or Creating a Message Queue
If the message queue already exists, mq_open() opens it, if the message
-queue does not exist, mq_open() creates it. When a message queue is
+queue does not exist, mq_open() creates it. When a message queue is
created, the geometry of the message queue is contained in the attribute
-structure that is passed in as an argument. This includes mq_msgsize that
+structure that is passed in as an argument. This includes mq_msgsize that
dictates the maximum size of a single message, and the mq_maxmsg that
-dictates the maximum number of messages the queue can hold at one time.
+dictates the maximum number of messages the queue can hold at one time.
The blocking or non-blocking behavior of the queue can also specified.
@subsection Closing a Message Queue
The mq_close() function is used to close the connection made to a message
-queue that was made during mq_open. The message queue itself and the
+queue that was made during mq_open. The message queue itself and the
messages on the queue are persistent and remain after the queue is closed.
@subsection Removing a Message Queue
-The mq_unlink() function removes the named message queue. If the message
+The mq_unlink() function removes the named message queue. If the message
queue is not open when mq_unlink is called, then the queue is immediately
-eliminated. Any messages that were on the queue are lost, and the queue
-can not be opened again. If processes have the queue open when mq_unlink
+eliminated. Any messages that were on the queue are lost, and the queue
+can not be opened again. If processes have the queue open when mq_unlink
is called, the removal of the queue is delayed until the last process
-using the queue has finished. However, the name of the message queue is
+using the queue has finished. However, the name of the message queue is
removed so that no other process can open it.
@subsection Sending a Message to a Message Queue
The mq_send() function adds the message in priority order to the message
-queue. Each message has an assigned a priority. The highest priority
+queue. Each message has an assigned a priority. The highest priority
message is be at the front of the queue.
The maximum number of messages that a message queue may accept is
-specified at creation by the mq_maxmsg field of the attribute structure.
+specified at creation by the mq_maxmsg field of the attribute structure.
If this amount is exceeded, the behavior of the process is determined
-according to what oflag was used when the message queue was opened. If
+according to what oflag was used when the message queue was opened. If
the queue was opened with O_NONBLOCK flag set, the process does not block,
-and an error is returned. If the O_NONBLOCK flag was not set, the process
+and an error is returned. If the O_NONBLOCK flag was not set, the process
does block and wait for space on the queue.
@subsection Receiving a Message from a Message Queue
The mq_receive() function is used to receive the oldest of the highest
-priority message(s) from the message queue specified by mqdes. The
-messages are received in FIFO order within the priorities. The received
-message's priority is stored in the location referenced by the msg_prio.
-If the msg_prio is a NULL, the priority is discarded. The message is
+priority message(s) from the message queue specified by mqdes. The
+messages are received in FIFO order within the priorities. The received
+message's priority is stored in the location referenced by the msg_prio.
+If the msg_prio is a NULL, the priority is discarded. The message is
removed and stored in an area pointed to by msg_ptr whose length is of
-msg_len. The msg_len must be at least equal to the mq_msgsize attribute
+msg_len. The msg_len must be at least equal to the mq_msgsize attribute
of the message queue.
The blocking behavior of the message queue is set by O_NONBLOCK at mq_open
-or by setting O_NONBLOCK in mq_flags in a call to mq_setattr. If this is
-a blocking queue, the process does block and wait on an empty queue. If
+or by setting O_NONBLOCK in mq_flags in a call to mq_setattr. If this is
+a blocking queue, the process does block and wait on an empty queue. If
this a non-blocking queue, the process does not block. Upon successful
completion, mq_receive returns the length of the selected message in bytes
and the message is removed from the queue.
@@ -190,52 +190,52 @@ and the message is removed from the queue.
@subsection Notification of Receipt of a Message on an Empty Queue
The mq_notify() function registers the calling process to be notified of
-message arrival at an empty message queue. Every message queue has the
+message arrival at an empty message queue. Every message queue has the
ability to notify one (and only one) process whenever the queue's state
-changes from empty (0 messages) to nonempty. This means that the process
-does not have to block or constantly poll while it waits for a message.
+changes from empty (0 messages) to nonempty. This means that the process
+does not have to block or constantly poll while it waits for a message.
By calling mq_notify, a notification request is attached to a message
-queue. When a message is received by an empty queue, if there are no
+queue. When a message is received by an empty queue, if there are no
processes blocked and waiting for the message, then the queue notifies the
-requesting process of a message arrival. There is only one signal sent by
+requesting process of a message arrival. There is only one signal sent by
the message queue, after that the notification request is de-registered
-and another process can attach its notification request. After receipt of
+and another process can attach its notification request. After receipt of
a notification, a process must re-register if it wishes to be notified
again.
If there is a process blocked and waiting for the message, that process
-gets the message, and notification is not sent. Only one process can have
-a notification request attached to a message queue at any one time. If
-another process attempts to register a notification request, it fails.
+gets the message, and notification is not sent. Only one process can have
+a notification request attached to a message queue at any one time. If
+another process attempts to register a notification request, it fails.
You can de-register for a message queue by passing a NULL to mq_notify,
-this removes any notification request attached to the queue. Whenever the
+this removes any notification request attached to the queue. Whenever the
message queue is closed, all notification attachments are removed.
@subsection Setting the Attributes of a Message Queue
The mq_setattr() function is used to set attributes associated with the
open message queue description referenced by the message queue descriptor
-specified by mqdes. The *omqstat represents the old or previous
-attributes. If omqstat is non-NULL, the function mq_setattr() stores, in
+specified by mqdes. The *omqstat represents the old or previous
+attributes. If omqstat is non-NULL, the function mq_setattr() stores, in
the location referenced by omqstat, the previous message queue attributes
-and the current queue status. These values are the same as would be
+and the current queue status. These values are the same as would be
returned by a call to mq_getattr() at that point.
-There is only one mq_attr.mq_flag that can be altered by this call. This
+There is only one mq_attr.mq_flag that can be altered by this call. This
is the flag that deals with the blocking and non-blocking behavior of the
-message queue. If the flag is set then the message queue is non-blocking,
-and requests to send or receive do not block while waiting for resources.
+message queue. If the flag is set then the message queue is non-blocking,
+and requests to send or receive do not block while waiting for resources.
If the flag is not set, then message send and receive may involve waiting
for an empty queue or waiting for a message to arrive.
@subsection Getting the Attributes of a Message Queue
The mq_getattr() function is used to get status information and attributes
-of the message queue associated with the message queue descriptor. The
+of the message queue associated with the message queue descriptor. The
results are returned in the mq_attr structure referenced by the mqstat
-argument. All of these attributes are set at create time, except the
+argument. All of these attributes are set at create time, except the
blocking/non-blocking behavior of the message queue which can be
-dynamically set by using mq_setattr. The attribute mq_curmsg is set to
+dynamically set by using mq_setattr. The attribute mq_curmsg is set to
reflect the number of messages on the queue at the time that mq_getattr
was called.
@@ -245,19 +245,25 @@ This section details the message passing 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.
+@c
+@c
+@c
@page
@subsection mq_open - Open a Message Queue
+@findex mq_open
+@cindex open a message queue
+
@subheading CALLING SEQUENCE:
@example
#include <mqueue.h>
mqd_t mq_open(
- const char *name,
- int oflag,
- mode_t mode,
- struct mq_attr *attr
+const char *name,
+int oflag,
+mode_t mode,
+struct mq_attr *attr
);
@end example
@@ -277,64 +283,70 @@ to create it.
@code{EINTR} - The call to mq_open was interrupted by a signal.
-@code{EMFILE} - The process has too many files or message queues open.
+@code{EMFILE} - The process has too many files or message queues open.
This is a process limit error.
@code{ENFILE} - The system has run out of resources to support more open
-message queues. This is a system error.
+message queues. This is a system error.
@code{ENAMETOOLONG} - mq_name is too long.
@subheading DESCRIPTION:
The mq_open () function establishes the connection between a process and a
-message queue with a message queue descriptor. If the message queue
+message queue with a message queue descriptor. If the message queue
already exists, mq_open opens it, if the message queue does not exist,
-mq_open creates it. Message queues can have multiple senders and
-receivers. If mq_open is successful, the function returns a message queue
-descriptor. Otherwise, the function returns a -1 and sets 'errno' to
+mq_open creates it. Message queues can have multiple senders and
+receivers. If mq_open is successful, the function returns a message queue
+descriptor. Otherwise, the function returns a -1 and sets 'errno' to
indicate the error.
-The name of the message queue is used as an argument. For the best of
+The name of the message queue is used as an argument. For the best of
portability, the name of the message queue should begin with a "/" and no
-other "/" should be in the name. Different systems interpret the name in
+other "/" should be in the name. Different systems interpret the name in
different ways.
The oflags contain information on how the message is opened if the queue
-already exists. This may be O_RDONLY for read only, O_WRONLY for write
+already exists. This may be O_RDONLY for read only, O_WRONLY for write
only, of O_RDWR, for read and write.
In addition, the oflags contain information needed in the creation of a
message queue. @code{O_NONBLOCK} - If the non-block flag is set then the
message queue is non-blocking, and requests to send and receive messages
-do not block waiting for resources. If the flag is not set then the
+do not block waiting for resources. If the flag is not set then the
message queue is blocking, and a request to send might have to wait for an
-empty message queue. Similarly, a request to receive might have to wait
+empty message queue. Similarly, a request to receive might have to wait
for a message to arrive on the queue. @code{O_CREAT} - This call specifies
-that the call the mq_open is to create a new message queue. In this case
-the mode and attribute arguments of the function call are utilized. The
+that the call the mq_open is to create a new message queue. In this case
+the mode and attribute arguments of the function call are utilized. The
message queue is created with a mode similar to the creation of a file,
read and write permission creator, group, and others.
-The geometry of the message queue is contained in the attribute structure.
+The geometry of the message queue is contained in the attribute structure.
This includes mq_msgsize that dictates the maximum size of a single
message, and the mq_maxmsg that dictates the maximum number of messages
-the queue can hold at one time. If a NULL is used in the mq_attr
+the queue can hold at one time. If a NULL is used in the mq_attr
argument, then the message queue is created with implementation defined
-defaults. @code{O_EXCL} - is always set if O_CREAT flag is set. If the
+defaults. @code{O_EXCL} - is always set if O_CREAT flag is set. If the
message queue already exists, O_EXCL causes an error message to be
returned, otherwise, the new message queue fails and appends to the
existing one.
@subheading NOTES:
-The mq_open () function does not add or remove messages from the queue.
+The mq_open () function does not add or remove messages from the queue.
When a new message queue is being created, the mq_flag field of the
attribute structure is not used.
+@c
+@c
+@c
@page
@subsection mq_close - Close a Message Queue
+@findex mq_close
+@cindex close a message queue
+
@subheading CALLING SEQUENCE:
@example
@@ -359,13 +371,19 @@ returns a value of -1 and sets errno to indicate the error.
If the process had successfully attached a notification request to the
message queue via mq_notify, this attachment is removed, and the message
-queue is available for another process to attach for notification.
+queue is available for another process to attach for notification.
mq_close has no effect on the contents of the message queue, all the
messages that were in the queue remain in the queue.
+@c
+@c
+@c
@page
@subsection mq_unlink - Remove a Message Queue
+@findex mq_unlink
+@cindex remove a message queue
+
@subheading CALLING SEQUENCE:
@example
@@ -380,35 +398,41 @@ int mq_unlink(const char *name);
@subheading DESCRIPTION:
-The mq_unlink() function removes the named message queue. If the message
+The mq_unlink() function removes the named message queue. If the message
queue is not open when mq_unlink is called, then the queue is immediately
-eliminated. Any messages that were on the queue are lost, and the queue
-can not be opened again. If processes have the queue open when mq_unlink
+eliminated. Any messages that were on the queue are lost, and the queue
+can not be opened again. If processes have the queue open when mq_unlink
is called, the removal of the queue is delayed until the last process
-using the queue has finished. However, the name of the message queue is
-removed so that no other process can open it. Upon successful completion,
-the function returns a value of zero. Otherwise, the named message queue
+using the queue has finished. However, the name of the message queue is
+removed so that no other process can open it. Upon successful completion,
+the function returns a value of zero. Otherwise, the named message queue
is not changed by this function call, and the function returns a value of
-1 and sets errno to indicate the error.
@subheading NOTES:
Calls to mq_open() to re-create the message queue may fail until the
-message queue is actually removed. However, the mq_unlink() call need not
+message queue is actually removed. However, the mq_unlink() call need not
block until all references have been closed; it may return immediately.
+@c
+@c
+@c
@page
@subsection mq_send - Send a Message to a Message Queue
+@findex mq_send
+@cindex send a message to a message queue
+
@subheading CALLING SEQUENCE:
@example
#include<mqueue.h>
int mq_send(
- mqd_t mqdes,
- const char *msg_ptr,
- size_t msg_len,
- unsigned int msg_prio
+mqd_t mqdes,
+const char *msg_ptr,
+size_t msg_len,
+unsigned int msg_prio
);
@end example
@@ -418,26 +442,26 @@ int mq_send(
@code{EINVAL} - The value of msg_prio was greater than the MQ_PRIO_MAX.
@code{EMSGSIZE} - The msg_len is greater than the mq_msgsize attribute of the message queue
@code{EAGAIN} - The message queue is non-blocking, and there is no room on the queue for another message as specified by the mq_maxmsg.
-@code{EINTR} - The message queue is blocking. While the process was waiting for free space on the queue, a signal arrived that interrupted the wait.
+@code{EINTR} - The message queue is blocking. While the process was waiting for free space on the queue, a signal arrived that interrupted the wait.
@subheading DESCRIPTION:
The mq_send() function adds the message pointed to by the argument msg_ptr
-to the message queue specified by mqdes. Each message is assigned a
+to the message queue specified by mqdes. Each message is assigned a
priority , from 0 to MQ_PRIO_MAX. MQ_PRIO_MAX is defined in <limits.h> and
-must be at least 32. Messages are added to the queue in order of their
-priority. The highest priority message is at the front of the queue.
+must be at least 32. Messages are added to the queue in order of their
+priority. The highest priority message is at the front of the queue.
The maximum number of messages that a message queue may accept is
-specified at creation by the mq_maxmsg field of the attribute structure.
+specified at creation by the mq_maxmsg field of the attribute structure.
If this amount is exceeded, the behavior of the process is determined
-according to what oflag was used when the message queue was opened. If
+according to what oflag was used when the message queue was opened. If
the queue was opened with O_NONBLOCK flag set, then the EAGAIN error is
-returned. If the O_NONBLOCK flag was not set, the process blocks and
+returned. If the O_NONBLOCK flag was not set, the process blocks and
waits for space on the queue, unless it is interrupted by a signal.
Upon successful completion, the mq_send () function returns a value of
-zero. Otherwise, no message is enqueued, the function returns -1, and
+zero. Otherwise, no message is enqueued, the function returns -1, and
errno is set to indicate the error.
@subheading NOTES:
@@ -445,19 +469,25 @@ errno is set to indicate the error.
If the specified message queue is not full, mq_send inserts the message at
the position indicated by the msg_prio argument.
+@c
+@c
+@c
@page
@subsection mq_receive - Receive a Message from a Message Queue
+@findex mq_receive
+@cindex receive a message from a message queue
+
@subheading CALLING SEQUENCE:
@example
#include <mqueue.h>
size_t mq_receive(
- mqd_t mqdes,
- char *msg_ptr,
- size_t msg_len,
- unsigned int *msg_prio
+mqd_t mqdes,
+char *msg_ptr,
+size_t msg_len,
+unsigned int *msg_prio
);
@end example
@@ -466,26 +496,26 @@ size_t mq_receive(
@code{EBADF} - The descriptor does not represent a valid message queue, or the queue was opened for write only O_WRONLY
@code{EMSGSIZE} - The msg_len is less than the mq_msgsize attribute of the message queue
@code{EAGAIN} - The message queue is non-blocking, and the queue is empty
-@code{EINTR} - The message queue is blocking. While the process was waiting for a message to arrive on the queue, a signal arrived that interrupted the wait.
+@code{EINTR} - The message queue is blocking. While the process was waiting for a message to arrive on the queue, a signal arrived that interrupted the wait.
@subheading DESCRIPTION:
The mq_receive function is used to receive the oldest of the highest
-priority message(s) from the message queue specified by mqdes. The
-messages are received in FIFO order within the priorities. The received
-message's priority is stored in the location referenced by the msg_prio.
-If the msg_prio is a NULL, the priority is discarded. The message is
+priority message(s) from the message queue specified by mqdes. The
+messages are received in FIFO order within the priorities. The received
+message's priority is stored in the location referenced by the msg_prio.
+If the msg_prio is a NULL, the priority is discarded. The message is
removed and stored in an area pointed to by msg_ptr whose length is of
-msg_len. The msg_len must be at least equal to the mq_msgsize attribute
+msg_len. The msg_len must be at least equal to the mq_msgsize attribute
of the message queue.
The blocking behavior of the message queue is set by O_NONBLOCK at mq_open
-or by setting O_NONBLOCK in mq_flags in a call to mq_setattr. If this is
-a blocking queue, the process blocks and waits on an empty queue. If this
+or by setting O_NONBLOCK in mq_flags in a call to mq_setattr. If this is
+a blocking queue, the process blocks and waits on an empty queue. If this
a non-blocking queue, the process does not block.
Upon successful completion, mq_receive returns the length of the selected
-message in bytes and the message is removed from the queue. Otherwise, no
+message in bytes and the message is removed from the queue. Otherwise, no
message is removed from the queue, the function returns a value of -1, and
sets errno to indicate the error.
@@ -495,17 +525,23 @@ If the size of the buffer in bytes, specified by the msg_len argument, is
less than the mq_msgsize attribute of the message queue, the function
fails and returns an error
+@c
+@c
+@c
@page
@subsection mq_notify - Notify Process that a Message is Available
+@findex mq_notify
+@cindex notify process that a message is available
+
@subheading CALLING SEQUENCE:
@example
#include <mqueue.h>
int mq_notify(
- mqd_t mqdes,
- const struct sigevent *notification
+mqd_t mqdes,
+const struct sigevent *notification
);
@end example
@@ -521,23 +557,23 @@ calling process to be notified of message arrival at an empty message
queue associated with the specified message queue descriptor, mqdes.
Every message queue has the ability to notify one (and only one) process
-whenever the queue's state changes from empty (0 messages) to nonempty.
+whenever the queue's state changes from empty (0 messages) to nonempty.
This means that the process does not have to block or constantly poll
-while it waits for a message. By calling mq_notify, a notification
-request is attached to a message queue. When a message is received by an
+while it waits for a message. By calling mq_notify, a notification
+request is attached to a message queue. When a message is received by an
empty queue, if there are no processes blocked and waiting for the
message, then the queue notifies the requesting process of a message
-arrival. There is only one signal sent by the message queue, after that
+arrival. There is only one signal sent by the message queue, after that
the notification request is de-registered and another process can attach
-its notification request. After receipt of a notification, a process must
+its notification request. After receipt of a notification, a process must
re-register if it wishes to be notified again.
If there is a process blocked and waiting for the message, that process
-gets the message, and notification is not be sent. Only one process can
-have a notification request attached to a message queue at any one time.
-If another process attempts to register a notification request, it fails.
+gets the message, and notification is not be sent. Only one process can
+have a notification request attached to a message queue at any one time.
+If another process attempts to register a notification request, it fails.
You can de-register for a message queue by passing a NULL to mq_notify;
-this removes any notification request attached to the queue. Whenever the
+this removes any notification request attached to the queue. Whenever the
message queue is closed, all notification attachments are removed.
Upon successful completion, mq_notify returns a value of zero; otherwise,
@@ -547,18 +583,24 @@ the function returns a value of -1 and sets errno to indicate the error.
It is possible for another process to receive the message after the notification is sent but before the notified process has sent its receive request.
+@c
+@c
+@c
@page
@subsection mq_setattr - Set Message Queue Attributes
+@findex mq_setattr
+@cindex set message queue attributes
+
@subheading CALLING SEQUENCE:
@example
#include <mqueue.h>
int mq_setattr(
- mqd_t mqdes,
- const struct mq_attr *mqstat,
- struct mq_attr *omqstat
+mqd_t mqdes,
+const struct mq_attr *mqstat,
+struct mq_attr *omqstat
);
@end example
@@ -571,21 +613,21 @@ int mq_setattr(
The mq_setattr function is used to set attributes associated with the open
message queue description referenced by the message queue descriptor
-specified by mqdes. The *omqstat represents the old or previous
-attributes. If omqstat is non-NULL, the function mq_setattr() stores, in
+specified by mqdes. The *omqstat represents the old or previous
+attributes. If omqstat is non-NULL, the function mq_setattr() stores, in
the location referenced by omqstat, the previous message queue attributes
-and the current queue status. These values are the same as would be
+and the current queue status. These values are the same as would be
returned by a call to mq_getattr() at that point.
-There is only one mq_attr.mq_flag which can be altered by this call.
+There is only one mq_attr.mq_flag which can be altered by this call.
This is the flag that deals with the blocking and non-blocking behavior of
-the message queue. If the flag is set then the message queue is
+the message queue. If the flag is set then the message queue is
non-blocking, and requests to send or receive do not block while waiting
-for resources. If the flag is not set, then message send and receive may
+for resources. If the flag is not set, then message send and receive may
involve waiting for an empty queue or waiting for a message to arrive.
Upon successful completion, the function returns a value of zero and the
-attributes of the message queue have been changed as specified.
+attributes of the message queue have been changed as specified.
Otherwise, the message queue attributes is unchanged, and the function
returns a value of -1 and sets errno to indicate the error.
@@ -593,9 +635,15 @@ returns a value of -1 and sets errno to indicate the error.
All other fields in the mq_attr are ignored by this call.
+@c
+@c
+@c
@page
@subsection mq_getattr - Get Message Queue Attributes
+@findex mq_getattr
+@cindex get message queue attributes
+
@subheading CALLING SEQUENCE:
@example
@@ -610,17 +658,17 @@ open message queue.
@subheading DESCRIPTION:
-The mqdes argument specifies a message queue descriptor. The mq_getattr
+The mqdes argument specifies a message queue descriptor. The mq_getattr
function is used to get status information and attributes of the message
-queue associated with the message queue descriptor. The results are
-returned in the mq_attr structure referenced by the mqstat argument. All
+queue associated with the message queue descriptor. The results are
+returned in the mq_attr structure referenced by the mqstat argument. All
of these attributes are set at create time, except the
blocking/non-blocking behavior of the message queue which can be
-dynamically set by using mq_setattr. The attribute mq_curmsg is set to
+dynamically set by using mq_setattr. The attribute mq_curmsg is set to
reflect the number of messages on the queue at the time that mq_getattr
was called.
-Upon successful completion, the mq_getattr function returns zero.
+Upon successful completion, the mq_getattr function returns zero.
Otherwise, the function returns -1 and sets errno to indicate the error.
@subheading NOTES:
diff --git a/doc/posix_users/mutex.t b/doc/posix_users/mutex.t
index 82f6767d5d..f39868bbcd 100644
--- a/doc/posix_users/mutex.t
+++ b/doc/posix_users/mutex.t
@@ -1,9 +1,9 @@
@c
-@c COPYRIGHT (c) 1988-1998.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
+@c COPYRIGHT (c) 1988-1998.
+@c On-Line Applications Research Corporation (OAR).
+@c All rights reserved.
@c
-@c $Id$
+@c $Id$
@c
@chapter Mutex Manager
@@ -11,7 +11,7 @@
@section Introduction
The mutex manager implements the functionality required of the mutex
-manager as defined by POSIX 1003.1b-1996. This standard requires that
+manager as defined by POSIX 1003.1b-1996. This standard requires that
a compliant operating system provide the facilties to ensure that
threads can operate with mutual exclusion from one another and
defines the API that must be provided.
@@ -41,9 +41,9 @@ The services provided by the mutex manager are:
@subsection Mutex Attributes
-Mutex attributes are utilized only at mutex creation time. A mutex
+Mutex attributes are utilized only at mutex creation time. A mutex
attribute structure may be initialized and passed as an argument to
-the @code{mutex_init} routine. Note that the priority ceiling of
+the @code{mutex_init} routine. Note that the priority ceiling of
a mutex may be set at run-time.
@table @b
@@ -69,7 +69,7 @@ pthread_mutex_t my_mutex = PTHREAD_MUTEX_INITIALIZER;
This indicates that @code{my_mutex} will be automatically initialized
by an implicit call to @code{pthread_mutex_init} the first time
-the mutex is used.
+the mutex is used.
Note that the mutex will be initialized with default attributes.
@@ -84,16 +84,22 @@ A subsection is dedicated to each of this manager's services
and describes the calling sequence, related constants, usage,
and status codes.
+@c
+@c
+@c
@page
@subsection pthread_mutexattr_init - Initialize a Mutex Attribute Set
+@findex pthread_mutexattr_init
+@cindex initialize a mutex attribute set
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_mutexattr_init(
- pthread_mutexattr_t *attr
+pthread_mutexattr_t *attr
);
@end example
@@ -115,16 +121,22 @@ individual attributes.
XXX insert list of default attributes here.
+@c
+@c
+@c
@page
@subsection pthread_mutexattr_destroy - Destroy a Mutex Attribute Set
+@findex pthread_mutexattr_destroy
+@cindex destroy a mutex attribute set
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_mutexattr_destroy(
- pthread_mutexattr_t *attr
+pthread_mutexattr_t *attr
);
@end example
@@ -142,24 +154,30 @@ The attribute set is not initialized.
@subheading DESCRIPTION:
The @code{pthread_mutex_attr_destroy} routine is used to destroy a mutex
-attributes object. The behavior of using an attributes object after
+attributes object. The behavior of using an attributes object after
it is destroyed is implementation dependent.
@subheading NOTES:
NONE
+@c
+@c
+@c
@page
@subsection pthread_mutexattr_setprotocol - Set the Blocking Protocol
+@findex pthread_mutexattr_setprotocol
+@cindex set the blocking protocol
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_mutexattr_setprotocol(
- pthread_mutexattr_t *attr,
- int protocol
+pthread_mutexattr_t *attr,
+int protocol
);
@end example
@@ -171,16 +189,16 @@ 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:
The @code{pthread_mutexattr_setprotocol} routine is used to set value of the
-@code{protocol} attribute. This attribute controls the order in which
+@code{protocol} attribute. This attribute controls the order in which
threads waiting on this mutex will receive it.
The @code{protocol} can be one of the following:
@@ -191,11 +209,11 @@ The @code{protocol} can be one of the following:
in which case blocking order is FIFO.
@item @code{PTHREAD_PRIO_INHERIT}
-in which case blocking order is priority with the priority inheritance
+in which case blocking order is priority with the priority inheritance
protocol in effect.
@item @code{PTHREAD_PRIO_PROTECT}
-in which case blocking order is priority with the priority ceiling
+in which case blocking order is priority with the priority ceiling
protocol in effect.
@end table
@@ -205,116 +223,134 @@ protocol in effect.
There is currently no way to get simple priority blocking ordering
with POSIX mutexes even though this could easily by supported by RTEMS.
+@c
+@c
+@c
@page
@subsection pthread_mutexattr_getprotocol - Get the Blocking Protocol
-
+
+@findex pthread_mutexattr_getprotocol
+@cindex get the blocking protocol
+
@subheading CALLING SEQUENCE:
-
+
@example
#include <pthread.h>
-
+
int pthread_mutexattr_getprotocol(
- pthread_mutexattr_t *attr,
- int *protocol
+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:
-
+
The @code{pthread_mutexattr_getprotocol} routine is used to obtain
-the value of the @code{protocol} attribute. This attribute controls
+the value of the @code{protocol} attribute. This attribute controls
the order in which threads waiting on this mutex will receive it.
@subheading NOTES:
NONE
+@c
+@c
+@c
@page
@subsection pthread_mutexattr_setprioceiling - Set the Priority Ceiling
+@findex pthread_mutexattr_setprioceiling
+@cindex set the priority ceiling
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_mutexattr_setprioceiling(
- pthread_mutexattr_t *attr,
- int prioceiling
+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:
The @code{pthread_mutexattr_setprioceiling} routine is used to set value of the
-@code{prioceiling} attribute. This attribute specifies the priority that
-is the ceiling for threads obtaining this mutex. Any task obtaining this
-mutex may not be of greater priority that the ceiling. If it is of lower
-priority, then its priority will be elevated to @code{prioceiling}.
+@code{prioceiling} attribute. This attribute specifies the priority that
+is the ceiling for threads obtaining this mutex. Any task obtaining this
+mutex may not be of greater priority that the ceiling. If it is of lower
+priority, then its priority will be elevated to @code{prioceiling}.
@subheading NOTES:
NONE
+@c
+@c
+@c
@page
@subsection pthread_mutexattr_getprioceiling - Get the Priority Ceiling
+@findex pthread_mutexattr_getprioceiling
+@cindex get the priority ceiling
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_mutexattr_getprioceiling(
- const pthread_mutexattr_t *attr,
- int *prioceiling
+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:
The @code{pthread_mutexattr_getprioceiling} routine is used to obtain the
-value of the @code{prioceiling} attribute. This attribute specifies the
+value of the @code{prioceiling} attribute. This attribute specifies the
priority ceiling for this mutex.
@@ -322,81 +358,99 @@ priority ceiling for this mutex.
NONE
+@c
+@c
+@c
@page
@subsection pthread_mutexattr_setpshared - Set the Visibility
+@findex pthread_mutexattr_setpshared
+@cindex set the visibility
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_mutexattr_setpshared(
- pthread_mutexattr_t *attr,
- int pshared
+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:
+@c
+@c
+@c
@page
@subsection pthread_mutexattr_getpshared - Get the Visibility
+@findex pthread_mutexattr_getpshared
+@cindex get the visibility
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_mutexattr_getpshared(
- const pthread_mutexattr_t *attr,
- int *pshared
+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:
+@c
+@c
+@c
@page
@subsection pthread_mutex_init - Initialize a Mutex
+@findex pthread_mutex_init
+@cindex initialize a mutex
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_mutex_init(
- pthread_mutex_t *mutex,
- const pthread_mutexattr_t *attr
+pthread_mutex_t *mutex,
+const pthread_mutexattr_t *attr
);
@end example
@@ -405,7 +459,7 @@ int pthread_mutex_init(
@table @b
@item EINVAL
The attribute set is not initialized.
-
+
@item EINVAL
The specified protocol is invalid.
@@ -425,21 +479,27 @@ initialized, but not yet destroyed.
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection pthread_mutex_destroy - Destroy a Mutex
+@findex pthread_mutex_destroy
+@cindex destroy a mutex
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_mutex_destroy(
- pthread_mutex_t *mutex
+pthread_mutex_t *mutex
);
@end example
@subheading STATUS CODES:
-
+
@table @b
@item EINVAL
The specified mutex is invalid.
@@ -447,23 +507,29 @@ 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:
+@c
+@c
+@c
@page
@subsection pthread_mutex_lock - Lock a Mutex
+@findex pthread_mutex_lock
+@cindex lock a mutex
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_mutex_lock(
- pthread_mutex_t *mutex
+pthread_mutex_t *mutex
);
@end example
@@ -474,7 +540,7 @@ int pthread_mutex_lock(
The specified mutex is invalid.
@item EINVAL
-The mutex has the protocol attribute of PTHREAD_PRIO_PROTECT and the
+The mutex has the protocol attribute of PTHREAD_PRIO_PROTECT and the
priority of the calling thread is higher than the current priority
ceiling.
@@ -487,60 +553,72 @@ The current thread already owns the mutex.
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection pthread_mutex_trylock - Poll to Lock a Mutex
-
+
+@findex pthread_mutex_trylock
+@cindex poll to lock a mutex
+
@subheading CALLING SEQUENCE:
-
+
@example
#include <pthread.h>
-
+
int pthread_mutex_trylock(
- pthread_mutex_t *mutex
+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:
-
+
+@c
+@c
+@c
@page
@subsection pthread_mutex_timedlock - Lock a Mutex with Timeout
-
+
+@findex pthread_mutex_timedlock
+@cindex lock a mutex with timeout
+
@subheading CALLING SEQUENCE:
-
+
@example
#include <pthread.h>
#include <time.h>
-
+
int pthread_mutex_timedlock(
- pthread_mutex_t *mutex,
- const struct timespec *timeout
+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.
@@ -548,27 +626,33 @@ The nanoseconds field of timeout is invalid.
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:
-
+
+@c
+@c
+@c
@page
@subsection pthread_mutex_unlock - Unlock a Mutex
+@findex pthread_mutex_unlock
+@cindex unlock a mutex
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_mutex_unlock(
- pthread_mutex_t *mutex
+pthread_mutex_t *mutex
);
@end example
@@ -577,30 +661,36 @@ int pthread_mutex_unlock(
@table @b
@item EINVAL
The specified mutex is invalid.
-
+
@end table
@subheading DESCRIPTION:
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection pthread_mutex_setprioceiling - Dynamically Set the Priority Ceiling
+@findex pthread_mutex_setprioceiling
+@cindex dynamically set the priority ceiling
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_mutex_setprioceiling(
- pthread_mutex_t *mutex,
- int prioceiling,
- int *oldceiling
+pthread_mutex_t *mutex,
+int prioceiling,
+int *oldceiling
);
@end example
@subheading STATUS CODES:
-
+
@table @b
@item EINVAL
The oldceiling pointer parameter is invalid.
@@ -610,36 +700,42 @@ The prioceiling parameter is an invalid priority.
@item EINVAL
The specified mutex is invalid.
-
+
@end table
@subheading DESCRIPTION:
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection pthread_mutex_getprioceiling - Get the Current Priority Ceiling
+@findex pthread_mutex_getprioceiling
+@cindex get the current priority ceiling
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_mutex_getprioceiling(
- pthread_mutex_t *mutex,
- int *prioceiling
+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:
diff --git a/doc/posix_users/posix_users.texi b/doc/posix_users/posix_users.texi
index 1439478001..28d34ac051 100644
--- a/doc/posix_users/posix_users.texi
+++ b/doc/posix_users/posix_users.texi
@@ -142,15 +142,15 @@ This is the online version of the RTEMS POSIX API User's Guide
@node Command and Variable Index, Concept Index, , Top
@unnumbered Command and Variable Index
-There are currently no Command and Variable Index entries.
+@c There are currently no Command and Variable Index entries.
-@c @printindex fn
+@printindex fn
@node Concept Index, , Command and Variable Index, Top
@unnumbered Concept Index
-There are currently no Concept Index entries.
-@c @printindex cp
+@c There are currently no Concept Index entries.
+@printindex cp
@contents
@bye
diff --git a/doc/posix_users/procenv.t b/doc/posix_users/procenv.t
index c232585e23..83b5f09c26 100644
--- a/doc/posix_users/procenv.t
+++ b/doc/posix_users/procenv.t
@@ -1,9 +1,9 @@
@c
-@c COPYRIGHT (c) 1988-1998.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
+@c COPYRIGHT (c) 1988-1998.
+@c On-Line Applications Research Corporation (OAR).
+@c All rights reserved.
@c
-@c $Id$
+@c $Id$
@c
@chapter Process Environment Manager
@@ -55,9 +55,15 @@ A subsection is dedicated to each of this manager's directives
and describes the calling sequence, related constants, usage,
and status codes.
+@c
+@c
+@c
@page
@subsection getpid - Get Process ID
+@findex getpid
+@cindex get process id
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -82,9 +88,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection getppid - Get Parent Process ID
+@findex getppid
+@cindex get parent process id
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -109,9 +121,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection getuid - Get User ID
+@findex getuid
+@cindex get user id
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -136,9 +154,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection geteuid - Get Effective User ID
+@findex geteuid
+@cindex get effective user id
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -163,9 +187,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection getgid - Get Real Group ID
+@findex getgid
+@cindex get real group id
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -190,9 +220,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection getegid - Get Effective Group ID
+@findex getegid
+@cindex get effective group id
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -217,9 +253,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection setuid - Set User ID
+@findex setuid
+@cindex set user id
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -244,9 +286,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection setgid - Set Group ID
+@findex setgid
+@cindex set group id
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -271,9 +319,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection getgroups - Get Supplementary Group IDs
+@findex getgroups
+@cindex get supplementary group ids
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -298,9 +352,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection getlogin - Get User Name
+@findex getlogin
+@cindex get user name
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -325,9 +385,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection getlogin_r - Reentrant Get User Name
+@findex getlogin_r
+@cindex reentrant get user name
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -352,9 +418,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection getpgrp - Get Process Group ID
+@findex getpgrp
+@cindex get process group id
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -379,9 +451,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection setsid - Create Session and Set Process Group ID
+@findex setsid
+@cindex create session and set process group id
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -406,9 +484,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection setpgid - Set Process Group ID for Job Control
+@findex setpgid
+@cindex set process group id for job control
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -433,9 +517,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection uname - Get System Name
+@findex uname
+@cindex get system name
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -460,16 +550,22 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection times - Get process times
+@findex times
+@cindex get process times
+
@subheading CALLING SEQUENCE:
@example
#include <sys/time.h>
clock_t times(
- struct tms *buf
+struct tms *buf
);
@end example
@@ -490,9 +586,15 @@ since the systm has been up.
NONE
+@c
+@c
+@c
@page
@subsection getenv - Get Environment Variables
+@findex getenv
+@cindex get environment variables
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -517,9 +619,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection setenv - Set Environment Variables
+@findex setenv
+@cindex set environment variables
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -544,9 +652,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection ctermid - Generate Terminal Pathname
+@findex ctermid
+@cindex generate terminal pathname
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -571,9 +685,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection ttyname - Determine Terminal Device Name
+@findex ttyname
+@cindex determine terminal device name
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -598,9 +718,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection ttyname_r - Reentrant Determine Terminal Device Name
+@findex ttyname_r
+@cindex reentrant determine terminal device name
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -625,9 +751,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection isatty - Determine if File Descriptor is Terminal
+@findex isatty
+@cindex determine if file descriptor is terminal
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -652,9 +784,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection sysconf - Get Configurable System Variables
+@findex sysconf
+@cindex get configurable system variables
+
@subheading CALLING SEQUENCE:
@ifset is-C
diff --git a/doc/posix_users/process.t b/doc/posix_users/process.t
index 7b5bece910..b4a7e5b692 100644
--- a/doc/posix_users/process.t
+++ b/doc/posix_users/process.t
@@ -1,9 +1,9 @@
@c
-@c COPYRIGHT (c) 1988-1998.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
+@c COPYRIGHT (c) 1988-1998.
+@c On-Line Applications Research Corporation (OAR).
+@c All rights reserved.
@c
-@c $Id$
+@c $Id$
@c
@chapter Process Creation and Execution Manager
@@ -15,7 +15,7 @@ The process creation and execution manager is ...
The directives provided by the process creation and execution manager are:
@itemize @bullet
-@item @code{fork} - Create a Process
+@item @code{fork} - Create a Process
@item @code{execl} - Execute a File
@item @code{execv} - Execute a File
@item @code{execle} - Execute a File
@@ -43,9 +43,15 @@ A subsection is dedicated to each of this manager's directives
and describes the calling sequence, related constants, usage,
and status codes.
+@c
+@c
+@c
@page
@subsection fork - Create a Process
+@findex fork
+@cindex create a process
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -75,17 +81,23 @@ This routine is not supported by RTEMS.
NONE
+@c
+@c
+@c
@page
@subsection execl - Execute a File
+@findex execl
+@cindex execute a file
+
@subheading CALLING SEQUENCE:
@ifset is-C
@example
int execl(
- const char *path,
- const char *arg,
- ...
+const char *path,
+const char *arg,
+...
);
@end example
@end ifset
@@ -109,17 +121,23 @@ This routine is not supported by RTEMS.
NONE
+@c
+@c
+@c
@page
@subsection execv - Execute a File
+@findex execv
+@cindex execute a file
+
@subheading CALLING SEQUENCE:
@ifset is-C
@example
int execv(
- const char *path,
- char const *argv[],
- ...
+const char *path,
+char const *argv[],
+...
);
@end example
@end ifset
@@ -143,17 +161,23 @@ This routine is not supported by RTEMS.
NONE
+@c
+@c
+@c
@page
@subsection execle - Execute a File
+@findex execle
+@cindex execute a file
+
@subheading CALLING SEQUENCE:
@ifset is-C
@example
int execle(
- const char *path,
- const char *arg,
- ...
+const char *path,
+const char *arg,
+...
);
@end example
@end ifset
@@ -177,17 +201,23 @@ This routine is not supported by RTEMS.
NONE
+@c
+@c
+@c
@page
@subsection execve - Execute a File
+@findex execve
+@cindex execute a file
+
@subheading CALLING SEQUENCE:
@ifset is-C
@example
int execve(
- const char *path,
- char *const argv[],
- char *const envp[]
+const char *path,
+char *const argv[],
+char *const envp[]
);
@end example
@end ifset
@@ -211,17 +241,23 @@ This routine is not supported by RTEMS.
NONE
+@c
+@c
+@c
@page
@subsection execlp - Execute a File
+@findex execlp
+@cindex execute a file
+
@subheading CALLING SEQUENCE:
@ifset is-C
@example
int execlp(
- const char *file,
- const char *arg,
- ...
+const char *file,
+const char *arg,
+...
);
@end example
@end ifset
@@ -245,17 +281,23 @@ This routine is not supported by RTEMS.
NONE
+@c
+@c
+@c
@page
@subsection execvp - Execute a File
+@findex execvp
+@cindex execute a file
+
@subheading CALLING SEQUENCE:
@ifset is-C
@example
int execvp(
- const char *file,
- char *const argv[]
- ...
+const char *file,
+char *const argv[]
+...
);
@end example
@end ifset
@@ -279,9 +321,15 @@ This routine is not supported by RTEMS.
NONE
+@c
+@c
+@c
@page
@subsection pthread_atfork - Register Fork Handlers
+@findex pthread_atfork
+@cindex register fork handlers
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -289,9 +337,9 @@ NONE
#include <sys/types.h>
int pthread_atfork(
- void (*prepare)(void),
- void (*parent)(void),
- void (*child)(void)
+void (*prepare)(void),
+void (*parent)(void),
+void (*child)(void)
);
@end example
@end ifset
@@ -315,18 +363,24 @@ This routine is not supported by RTEMS.
NONE
+@c
+@c
+@c
@page
@subsection wait - Wait for Process Termination
+@findex wait
+@cindex wait for process termination
+
@subheading CALLING SEQUENCE:
@ifset is-C
@example
#include <sys/types.h>
#include <sys/wait.h>
-
+
int wait(
- int *stat_loc
+int *stat_loc
);
@end example
@end ifset
@@ -350,17 +404,23 @@ This routine is not supported by RTEMS.
NONE
+@c
+@c
+@c
@page
@subsection waitpid - Wait for Process Termination
+@findex waitpid
+@cindex wait for process termination
+
@subheading CALLING SEQUENCE:
@ifset is-C
@example
int wait(
- pid_t pid,
- int *stat_loc,
- int options
+pid_t pid,
+int *stat_loc,
+int options
);
@end example
@end ifset
@@ -384,15 +444,21 @@ This routine is not supported by RTEMS.
NONE
+@c
+@c
+@c
@page
@subsection _exit - Terminate a Process
+@findex _exit
+@cindex terminate a process
+
@subheading CALLING SEQUENCE:
@ifset is-C
@example
void _exit(
- int status
+int status
);
@end example
@end ifset
@@ -411,4 +477,4 @@ The @code{_exit()} function terminates the calling process.
@subheading NOTES:
In RTEMS, a process is equivalent to the entire application on a single
-processor. Invoking this service terminates the application.
+processor. Invoking this service terminates the application.
diff --git a/doc/posix_users/sched.t b/doc/posix_users/sched.t
index 5730c52e2e..d2b9db5d07 100644
--- a/doc/posix_users/sched.t
+++ b/doc/posix_users/sched.t
@@ -1,9 +1,9 @@
@c
-@c COPYRIGHT (c) 1988-1998.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
+@c COPYRIGHT (c) 1988-1998.
+@c On-Line Applications Research Corporation (OAR).
+@c All rights reserved.
@c
-@c $Id$
+@c $Id$
@c
@chapter Scheduler Manager
@@ -27,7 +27,7 @@ The directives provided by the scheduler manager are:
In the RTEMS implementation of the POSIX API, the priorities range from
the low priority of @code{sched_get_priority_min()} to the highest priority of
-@code{sched_get_priority_max()}. Numerically higher values represent higher
+@code{sched_get_priority_max()}. Numerically higher values represent higher
priorities.
@subsection Scheduling Policies
@@ -36,24 +36,24 @@ The following scheduling policies are available:
@table @b
@item SCHED_FIFO
-Priority-based, preemptive scheduling with no timeslicing. This is equivalent
+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
+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
+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
+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,
+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
@@ -69,16 +69,22 @@ A subsection is dedicated to each of this manager's directives
and describes the calling sequence, related constants, usage,
and status codes.
+@c
+@c
+@c
@page
@subsection sched_get_priority_min - Get Minimum Priority Value
+@findex sched_get_priority_min
+@cindex get minimum priority value
+
@subheading CALLING SEQUENCE:
@example
#include <sched.h>
int sched_get_priority_min(
- int policy
+int policy
);
@end example
@@ -89,7 +95,7 @@ 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:
@@ -101,16 +107,22 @@ for the specified @code{policy}.
NONE
+@c
+@c
+@c
@page
@subsection sched_get_priority_max - Get Maximum Priority Value
+@findex sched_get_priority_max
+@cindex get maximum priority value
+
@subheading CALLING SEQUENCE:
@example
#include <sched.h>
int sched_get_priority_max(
- int policy
+int policy
);
@end example
@@ -121,7 +133,7 @@ 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:
@@ -133,17 +145,23 @@ for the specified @code{policy}.
NONE
+@c
+@c
+@c
@page
@subsection sched_rr_get_interval - Get Timeslicing Quantum
+@findex sched_rr_get_interval
+@cindex get timeslicing quantum
+
@subheading CALLING SEQUENCE:
@example
#include <sched.h>
int sched_rr_get_interval(
- pid_t pid,
- struct timespec *interval
+pid_t pid,
+struct timespec *interval
);
@end example
@@ -153,25 +171,31 @@ On error, this routine returns -1 and sets errno to one of the following:
@table @b
@item ESRCH
-The indicated process id is invalid.
-
+The indicated process id is invalid.
+
@item EINVAL
-The specified interval pointer parameter is invalid.
+The specified interval pointer parameter is invalid.
@end table
@subheading DESCRIPTION:
-This routine returns the length of the timeslice quantum in the
+This routine returns the length of the timeslice quantum in the
@code{interval} parameter for the specified @code{pid}.
@subheading NOTES:
The @code{pid} argument should be 0 to indicate the calling process.
+@c
+@c
+@c
@page
@subsection sched_yield - Yield the Processor
+@findex sched_yield
+@cindex yield the processor
+
@subheading CALLING SEQUENCE:
@example
@@ -187,7 +211,7 @@ This routine always returns zero to indicate success.
@subheading DESCRIPTION:
This call forces the calling thread to yield the processor to another
-thread. Normally this is used to implement voluntary round-robin
+thread. Normally this is used to implement voluntary round-robin
task scheduling.
@subheading NOTES:
diff --git a/doc/posix_users/semaphores.t b/doc/posix_users/semaphores.t
index 92d5b6ccc3..9668d3c2eb 100644
--- a/doc/posix_users/semaphores.t
+++ b/doc/posix_users/semaphores.t
@@ -1,17 +1,17 @@
@c
-@c COPYRIGHT(c) 1988-1998.
-@c On-Line Applications Research Corporation(OAR).
-@c All rights reserved.
+@c COPYRIGHT(c) 1988-1998.
+@c On-Line Applications Research Corporation(OAR).
+@c All rights reserved.
@c
-@c $Id$
+@c $Id$
@c
@chapter Semaphore Manager
@section Introduction
-The semaphore manager provides functions to allocate, delete, and control
-semaphores. This manager is based on the POSIX 1003.1 standard.
+The semaphore manager provides functions to allocate, delete, and control
+semaphores. This manager is based on the POSIX 1003.1 standard.
The directives provided by the semaphore manager are:
@@ -30,28 +30,28 @@ The directives provided by the semaphore manager are:
@section Background
@subsection Theory
-Semaphores are used for synchronization and mutual exclusion by indicating the
-availability and number of resources. The task (the task which is returning
-resources) notifying other tasks of an event increases the number of resources
-held by the semaphore by one. The task (the task which will obtain resources)
-waiting for the event decreases the number of resources held by the semaphore
-by one. If the number of resources held by a semaphore is insufficient (namely
-0), the task requiring resources will wait until the next time resources are
-returned to the semaphore. If there is more than one task waiting for a
-semaphore, the tasks will be placed in the queue.
+Semaphores are used for synchronization and mutual exclusion by indicating the
+availability and number of resources. The task (the task which is returning
+resources) notifying other tasks of an event increases the number of resources
+held by the semaphore by one. The task (the task which will obtain resources)
+waiting for the event decreases the number of resources held by the semaphore
+by one. If the number of resources held by a semaphore is insufficient (namely
+0), the task requiring resources will wait until the next time resources are
+returned to the semaphore. If there is more than one task waiting for a
+semaphore, the tasks will be placed in the queue.
@subsection "sem_t" Structure
-The "sem_t" structure is used to represent semaphores. It is passed as an
+The "sem_t" structure is used to represent semaphores. It is passed as an
argument to the semaphore directives and is defined as follows:
@example
- /*
- * sem_t structure
- */
+/backit /backit~ /bin /boot /dev /etc /home /lib /lost+found /mnt /proc /root /sbin /tmp /usr /usr1 /usr2 /usr3 /var
+CVS Makefile cancel.t clock.t cond.t cspecific.t device.t files.t io.t j key.t memorymgmt.t message.t mutex.t nodesc nodescr posix_users.cps posix_users.fns posix_users.texi preface.texi procenv.t process.t psxmsg.t sched.t semaphores.t signal.t systemdb.t thread.t sem_t structure
+CVS/
- typedef int sem_t
+typedef int sem_t
@end example
-
+
@subsection Building a Semaphore Attribute Set
@section Operations
@@ -59,12 +59,12 @@ argument to the semaphore directives and is defined as follows:
@subsection Using as a Binary Semaphore
Although POSIX supports mutexes, they are only visible between threads. To work
between processes, a binary semaphore must be used.
-
-Creating a semaphore with a limit on the count of 1 effectively restricts the
-semaphore to being a binary semaphore. When the binary semaphore is available,
-the count is 1. When the binary semaphore is unavailable, the count is 0.
-Since this does not result in a true binary semaphore, advanced binary features like the Priority Inheritance and Priority Ceiling Protocols are not available.
+Creating a semaphore with a limit on the count of 1 effectively restricts the
+semaphore to being a binary semaphore. When the binary semaphore is available,
+the count is 1. When the binary semaphore is unavailable, the count is 0.
+
+Since this does not result in a true binary semaphore, advanced binary features like the Priority Inheritance and Priority Ceiling Protocols are not available.
There is currently no text in this section.
@@ -75,17 +75,23 @@ A subsection is dedicated to each of this manager's directives
and describes the calling sequence, related constants, usage,
and status codes.
+@c
+@c
+@c
@page
@subsection sem_init - Initialize an unnamed semaphore
+@findex sem_init
+@cindex initialize an unnamed semaphore
+
@subheading CALLING SEQUENCE:
@ifset is-C
@example
int sem_init(
- sem_t *sem,
- int pshared,
- unsigned int value
+sem_t *sem,
+int pshared,
+unsigned int value
);
@end example
@end ifset
@@ -112,8 +118,8 @@ The process lacks appropriate privileges to initialize the semaphore
@end table
@subheading DESCRIPTION:
-The sem_init function is used to initialize the unnamed semaphore referred to
-by "sem". The value of the initialized semaphore is the parameter "value". The
+The sem_init function is used to initialize the unnamed semaphore referred to
+by "sem". The value of the initialized semaphore is the parameter "value". The
semaphore remains valid until it is destroyed.
ADD MORE HERE XXX
@@ -125,15 +131,21 @@ that occurred.
Multiprocessing is currently not supported in this implementation.
+@c
+@c
+@c
@page
@subsection sem_destroy - Destroy an unnamed semaphore
+@findex sem_destroy
+@cindex destroy an unnamed semaphore
+
@subheading CALLING SEQUENCE:
@ifset is-C
@example
int sem_destroy(
- sem_t *sem
+sem_t *sem
);
@end example
@end ifset
@@ -156,8 +168,8 @@ There are currently processes blocked on the semaphore
@end table
@subheading DESCRIPTION:
-The sem_destroy function is used to destroy an unnamed semaphore refered to by
-"sem". sem_destroy can only be used on a semaphore that was created using
+The sem_destroy function is used to destroy an unnamed semaphore refered to by
+"sem". sem_destroy can only be used on a semaphore that was created using
sem_init.
@subheading NOTES:
@@ -168,16 +180,22 @@ that occurred.
Multiprocessing is currently not supported in this implementation.
+@c
+@c
+@c
@page
@subsection sem_open - Open a named semaphore
+@findex sem_open
+@cindex open a named semaphore
+
@subheading CALLING SEQUENCE:
@ifset is-C
@example
int sem_open)
- const char *name,
- int oflag
+const char *name,
+int oflag
);
@end example
@end ifset
@@ -189,26 +207,26 @@ int sem_open)
The following flag bit may be set in oflag:
-@code{O_CREAT} - Creates the semaphore if it does not already exist. If O_CREAT
-is set and the semaphore already exists then O_CREAT has no effect. Otherwise,
-sem_open() creates a semaphore. The O_CREAT flag requires the third and fourth
-argument: mode and value of type mode_t and unsigned int, respectively.
+@code{O_CREAT} - Creates the semaphore if it does not already exist. If O_CREAT
+is set and the semaphore already exists then O_CREAT has no effect. Otherwise,
+sem_open() creates a semaphore. The O_CREAT flag requires the third and fourth
+argument: mode and value of type mode_t and unsigned int, respectively.
-@code{O_EXCL} - If O_EXCL and O_CREAT are set, all call to sem_open() shall fail
+@code{O_EXCL} - If O_EXCL and O_CREAT are set, all call to sem_open() shall fail
if the semaphore name exists
@subheading STATUS CODES:
@table @b
@item EACCES
-Valid name specified but oflag permissions are denied, or the semaphore name
+Valid name specified but oflag permissions are denied, or the semaphore name
specified does not exist and permission to create the named semaphore is denied.
@item EEXIST
O_CREAT and O_EXCL are set and the named semaphore already exists.
@item EINTR
-The sem_open() operation was interrupted by a signal.
+The sem_open() operation was interrupted by a signal.
@item EINVAL
The sem_open() operation is not supported for the given name.
@@ -217,8 +235,8 @@ The sem_open() operation is not supported for the given name.
Too many semaphore descriptors or file descriptors in use by this process.
@item ENAMETOOLONG
-The length of the name exceed PATH_MAX or name component is longer than NAME_MAX
-while POSIX_NO_TRUNC is in effect.
+The length of the name exceed PATH_MAX or name component is longer than NAME_MAX
+while POSIX_NO_TRUNC is in effect.
@item ENOENT
O_CREAT is not set and the named semaphore does not exist.
@@ -233,23 +251,29 @@ The function sem_open() is not supported by this implementation.
@subheading DESCRIPTION:
The sem_open() function establishes a connection between a specified semaphore and
-a process. After a call to sem_open with a specified semaphore name, a process
-can reference to semaphore by the associated name using the address returned by
-the call. The oflag arguments listed above control the state of the semaphore by
+a process. After a call to sem_open with a specified semaphore name, a process
+can reference to semaphore by the associated name using the address returned by
+the call. The oflag arguments listed above control the state of the semaphore by
determining if the semaphore is created or accessed by a call to sem_open().
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection sem_close - Close a named semaphore
+@findex sem_close
+@cindex close a named semaphore
+
@subheading CALLING SEQUENCE:
@ifset is-C
@example
int sem_close(
- sem_t *sem_close
+sem_t *sem_close
);
@end example
@end ifset
@@ -261,7 +285,7 @@ int sem_close(
@table @b
@item EACCES
-The semaphore argument is not a valid semaphore descriptor.
+The semaphore argument is not a valid semaphore descriptor.
@item ENOSYS
The function sem_close is not supported by this implementation.
@@ -269,23 +293,29 @@ The function sem_close is not supported by this implementation.
@end table
@subheading DESCRIPTION:
-The sem_close() function is used to indicate that the calling process is finished
-using the named semaphore indicated by sem. The function sem_close deallocates
-any system resources that were previously allocated by a sem_open system call. If
-sem_close() completes successfully it returns a 1, otherwise a value of -1 is
+The sem_close() function is used to indicate that the calling process is finished
+using the named semaphore indicated by sem. The function sem_close deallocates
+any system resources that were previously allocated by a sem_open system call. If
+sem_close() completes successfully it returns a 1, otherwise a value of -1 is
return and errno is set.
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection sem_unlink - Unlink a semaphore
+@findex sem_unlink
+@cindex unlink a semaphore
+
@subheading CALLING SEQUENCE:
@ifset is-C
@example
int sem_unlink(
- const char *name
+const char *name
);
@end example
@end ifset
@@ -300,7 +330,7 @@ int sem_unlink(
Permission is denied to unlink a semaphore.
@item ENAMETOOLONG
-The length of the strong name exceed NAME_MAX while POSIX_NO_TRUNC is in effect.
+The length of the strong name exceed NAME_MAX while POSIX_NO_TRUNC is in effect.
@item ENOENT
The name of the semaphore does not exist.
@@ -315,26 +345,32 @@ The function sem_unlink is not supported by this implementation.
@subheading DESCRIPTION:
The sem_unlink() function shall remove the semaphore name by the string name. If
-a process is currently accessing the name semaphore, the sem_unlink command has
+a process is currently accessing the name semaphore, the sem_unlink command has
no effect. If one or more processes have the semaphore open when the sem_unlink
-function is called, the destruction of semaphores shall be postponed until all
-reference to semaphore are destroyed by calls to sem_close, _exit(), or exec.
-After all references have been destroyed, it returns immediately.
+function is called, the destruction of semaphores shall be postponed until all
+reference to semaphore are destroyed by calls to sem_close, _exit(), or exec.
+After all references have been destroyed, it returns immediately.
-If the termination is successful, the function shall return 0. Otherwise, a -1
+If the termination is successful, the function shall return 0. Otherwise, a -1
is returned and the errno is set.
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection sem_wait - Wait on a Semaphore
+@findex sem_wait
+@cindex wait on a semaphore
+
@subheading CALLING SEQUENCE:
@ifset is-C
@example
int sem_wait(
- sem_t *sem
+sem_t *sem
);
@end example
@end ifset
@@ -351,11 +387,11 @@ The "sem" argument does not refer to a valid semaphore
@end table
@subheading DESCRIPTION:
-This function attempts to lock a semaphore specified by @code{sem}. If the
+This function attempts to lock a semaphore specified by @code{sem}. If the
semaphore is available, then the semaphore is locked (i.e., the semaphore
-value is decremented). If the semaphore is unavailable (i.e., the semaphore
+value is decremented). If the semaphore is unavailable (i.e., the semaphore
value is zero), then the function will block until the semaphore becomes
-available. It will then successfully lock the semaphore. The semaphore
+available. It will then successfully lock the semaphore. The semaphore
remains locked until released by a @code{sem_post()} call.
If the call is unsuccessful, then the function returns -1 and sets errno to the
@@ -364,15 +400,21 @@ appropriate error code.
@subheading NOTES:
Multiprocessing is not supported in this implementation.
+@c
+@c
+@c
@page
@subsection sem_trywait - Non-blocking Wait on a Semaphore
+@findex sem_trywait
+@cindex non
+
@subheading CALLING SEQUENCE:
@ifset is-C
@example
int sem_trywait(
- sem_t *sem
+sem_t *sem
);
@end example
@end ifset
@@ -393,10 +435,10 @@ The @code{sem} argument does not refewr to a valid semaphore
@end table
@subheading DESCRIPTION:
-This function attempts to lock a semaphore specified by @code{sem}. If the
+This function attempts to lock a semaphore specified by @code{sem}. If the
semaphore is available, then the semaphore is locked (i.e., the semaphore
-value is decremented) and the function returns a value of 0. The semaphore
-remains locked until released by a @code{sem_post()} call. If the semaphore
+value is decremented) and the function returns a value of 0. The semaphore
+remains locked until released by a @code{sem_post()} call. If the semaphore
is unavailable (i.e., the semaphore value is zero), then the function will
return a value of -1 immediately and set @code{errno} to EAGAIN.
@@ -406,16 +448,22 @@ If the call is unsuccessful, then the function returns -1 and sets
@subheading NOTES:
Multiprocessing is not supported in this implementation.
+@c
+@c
+@c
@page
@subsection sem_timedwait - Wait on a Semaphore for a Specified Time
+@findex sem_timedwait
+@cindex wait on a semaphore for a specified time
+
@subheading CALLING SEQUENCE:
@ifset is-C
@example
int sem_timedwait(
- sem_t *sem,
- const struct timespec *timeout
+sem_t *sem,
+const struct timespec *timeout
);
@end example
@end ifset
@@ -437,10 +485,10 @@ The @code{sem} argument does not refewr to a valid semaphore
@subheading DESCRIPTION:
This function attemtps to lock a semaphore specified by @code{sem}, and will
-wait for the semaphore for an interval specified by @code{timeout}. If the
+wait for the semaphore for an interval specified by @code{timeout}. If the
semaphore is available, then the semaphore is locked (i.e., the semaphore
-value is decremented) and the function returns a value of 0. The semaphore
-remains locked until released by a @code{sem_post()} call. If the semaphore
+value is decremented) and the function returns a value of 0. The semaphore
+remains locked until released by a @code{sem_post()} call. If the semaphore
is unavailable, then the function will wait for the semaphore to become
available for the amount of time specified by @code{timeout}.
@@ -452,15 +500,21 @@ the appropriate error code.
@subheading NOTES:
Multiprocessing is not supported in this implementation.
+@c
+@c
+@c
@page
@subsection sem_post - Unlock a Semaphore
+@findex sem_post
+@cindex unlock a semaphore
+
@subheading CALLING SEQUENCE:
@ifset is-C
@example
int sem_post(
- sem_t *sem
+sem_t *sem
);
@end example
@end ifset
@@ -477,12 +531,12 @@ The @code{sem} argument does not refer to a valid semaphore
@end table
@subheading DESCRIPTION:
-This function attempts to release the semaphore specified by @code{sem}. If
+This function attempts to release the semaphore specified by @code{sem}. If
other tasks are waiting on the semaphore, then one of those tasks (which one
depends on the scheduler being used) is allowed to lock the semaphore and
return from its @code{sem_wait()}, @code{sem_trywait()}, or
-@code{sem_timedwait()} call. If there are no other tasks waiting on the
-semaphore, then the semaphore value is simply incremented. @code{sem_post()}
+@code{sem_timedwait()} call. If there are no other tasks waiting on the
+semaphore, then the semaphore value is simply incremented. @code{sem_post()}
returns 0 upon successful completion.
If an error occurs, the function returns -1 and sets @code{errno} to the
@@ -491,16 +545,22 @@ appropriate error code.
@subheading NOTES:
Multiprocessing is not supported in this implementation.
+@c
+@c
+@c
@page
@subsection sem_getvalue - Get the value of a semaphore
+@findex sem_getvalue
+@cindex get the value of a semaphore
+
@subheading CALLING SEQUENCE:
@ifset is-C
@example
int sem_getvalue(
- sem_t *sem,
- int *sval
+sem_t *sem,
+int *sval
);
@end example
@end ifset
@@ -520,17 +580,17 @@ The function sem_getvalue is not supported by this implementation
@end table
@subheading DESCRIPTION:
-The sem_getvalue functions sets the location referenced by the "sval" argument
+The sem_getvalue functions sets the location referenced by the "sval" argument
to the value of the semaphore without affecting the state of the semaphore. The
-updated value represents a semaphore value that occurred at some point during
-the call, but is not necessarily the actual value of the semaphore when it
+updated value represents a semaphore value that occurred at some point during
+the call, but is not necessarily the actual value of the semaphore when it
returns to the calling process.
-
-If "sem" is locked, the value returned by sem_getvalue will be zero or a
-negative number whose absolute value is the number of processes waiting for the
+
+If "sem" is locked, the value returned by sem_getvalue will be zero or a
+negative number whose absolute value is the number of processes waiting for the
semaphore at some point during the call.
@subheading NOTES:
-If the functions completes successfully, it shall return a value of zero.
-Otherwise, it shall return a value of -1 and set "errno" to specify the error
+If the functions completes successfully, it shall return a value of zero.
+Otherwise, it shall return a value of -1 and set "errno" to specify the error
that occurred.
diff --git a/doc/posix_users/signal.t b/doc/posix_users/signal.t
index f37708bd4a..b3c4a71632 100644
--- a/doc/posix_users/signal.t
+++ b/doc/posix_users/signal.t
@@ -1,9 +1,9 @@
@c
-@c COPYRIGHT (c) 1988-1998.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
+@c COPYRIGHT (c) 1988-1998.
+@c On-Line Applications Research Corporation (OAR).
+@c All rights reserved.
@c
-@c $Id$
+@c $Id$
@c
@chapter Signal Manager
@@ -51,19 +51,19 @@ 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
-(@code{sigwait()}), then the signal is delivered to the highest priority
+@item If any threads are currently blocked waiting for this signal
+(@code{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
+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 (@code{sigprocmask()} or
+pending. The first thread to unblock the signal (@code{sigprocmask()} or
@code{pthread_sigprocmask()}) or to wait for this signal
(@code{sigwait()}) will be the recipient of the signal.
@@ -80,17 +80,23 @@ A subsection is dedicated to each of this manager's directives
and describes the calling sequence, related constants, usage,
and status codes.
+@c
+@c
+@c
@page
@subsection sigaddset - Add a Signal to a Signal Set
+@findex sigaddset
+@cindex add a signal to a signal set
+
@subheading CALLING SEQUENCE:
@example
#include <signal.h>
int sigaddset(
- sigset_t *set,
- int signo
+sigset_t *set,
+int signo
);
@end example
@@ -110,17 +116,23 @@ This function adds the @code{signo} to the specified signal @code{set}.
NONE
+@c
+@c
+@c
@page
@subsection sigdelset - Delete a Signal from a Signal Set
+@findex sigdelset
+@cindex delete a signal from a signal set
+
@subheading CALLING SEQUENCE:
@example
#include <signal.h>
int sigdelset(
- sigset_t *set,
- int signo
+sigset_t *set,
+int signo
);
@end example
@@ -140,16 +152,22 @@ This function deletes the @code{signo} to the specified signal @code{set}.
NONE
+@c
+@c
+@c
@page
@subsection sigfillset - Fill a Signal Set
+@findex sigfillset
+@cindex fill a signal set
+
@subheading CALLING SEQUENCE:
@example
#include <signal.h>
int sigfillset(
- sigset_t *set
+sigset_t *set
);
@end example
@@ -171,17 +189,23 @@ signals are set.
NONE
+@c
+@c
+@c
@page
@subsection sigismember - Is Signal a Member of a Signal Set
+@findex sigismember
+@cindex is signal a member of a signal set
+
@subheading CALLING SEQUENCE:
@example
#include <signal.h>
int sigismember(
- const sigset_t *set,
- int signo
+const sigset_t *set,
+int signo
);
@end example
@@ -203,16 +227,22 @@ and 0 otherwise.
NONE
+@c
+@c
+@c
@page
@subsection sigemptyset - Empty a Signal Set
+@findex sigemptyset
+@cindex empty a signal set
+
@subheading CALLING SEQUENCE:
@example
#include <signal.h>
int sigemptyset(
- sigset_t *set
+sigset_t *set
);
@end example
@@ -234,18 +264,24 @@ signals are cleared.
NONE
+@c
+@c
+@c
@page
@subsection sigaction - Examine and Change Signal Action
+@findex sigaction
+@cindex examine and change signal action
+
@subheading CALLING SEQUENCE:
@example
#include <signal.h>
int sigaction(
- int sig,
- const struct sigaction *act,
- struct sigaction *oact
+int sig,
+const struct sigaction *act,
+struct sigaction *oact
);
@end example
@@ -262,8 +298,8 @@ Realtime Signals Extension option not supported.
@subheading DESCRIPTION:
-This function is used to change the action taken by a process on
-receipt of the specfic signal @code{sig}. The new action is
+This function is used to change the action taken by a process on
+receipt of the specfic signal @code{sig}. The new action is
specified by @code{act} and the previous action is returned
via @code{oact}.
@@ -271,17 +307,23 @@ via @code{oact}.
The signal number cannot be SIGKILL.
+@c
+@c
+@c
@page
@subsection pthread_kill - Send a Signal to a Thread
+@findex pthread_kill
+@cindex send a signal to a thread
+
@subheading CALLING SEQUENCE:
@example
#include <signal.h>
int pthread_kill(
- pthread_t thread,
- int sig
+pthread_t thread,
+int sig
);
@end example
@@ -305,41 +347,47 @@ This functions sends the specified signal @code{sig} to @code{thread}.
NONE
+@c
+@c
+@c
@page
@subsection sigprocmask - Examine and Change Process Blocked Signals
-
+
+@findex sigprocmask
+@cindex examine and change process blocked signals
+
@subheading CALLING SEQUENCE:
-
+
@example
#include <signal.h>
-
+
int sigprocmask(
- int how,
- const sigset_t *set,
- sigset_t *oset
+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:
-
+
This function is used to alter the set of currently blocked signals
-on a process wide basis. A blocked signal will not be received by the
-process. The behavior of this function is dependent on the value of
+on a process wide basis. A blocked signal will not be received by the
+process. The behavior of this function is dependent on the value of
@code{how} which may be one of the following:
@table @code
@item SIG_BLOCK
-The set of blocked signals is set to the union of @code{set} and
+The set of blocked signals is set to the union of @code{set} and
those signals currently blocked.
@item SIG_UNBLOCK
@@ -358,18 +406,24 @@ prior to this call is returned in @code{oset}.
It is not an error to unblock a signal which is not blocked.
+@c
+@c
+@c
@page
@subsection pthread_sigmask - Examine and Change Thread Blocked Signals
+@findex pthread_sigmask
+@cindex examine and change thread blocked signals
+
@subheading CALLING SEQUENCE:
@example
#include <signal.h>
int pthread_sigmask(
- int how,
- const sigset_t *set,
- sigset_t *oset
+int how,
+const sigset_t *set,
+sigset_t *oset
);
@end example
@@ -383,8 +437,8 @@ Invalid argument passed.
@subheading DESCRIPTION:
This function is used to alter the set of currently blocked signals
-for the calling thread. A blocked signal will not be received by the
-process. The behavior of this function is dependent on the value of
+for the calling thread. A blocked signal will not be received by the
+process. The behavior of this function is dependent on the value of
@code{how} which may be one of the following:
@table @code
@@ -409,9 +463,15 @@ prior to this call is returned in @code{oset}.
It is not an error to unblock a signal which is not blocked.
+@c
+@c
+@c
@page
@subsection kill - Send a Signal to a Process
+@findex kill
+@cindex send a signal to a process
+
@subheading CALLING SEQUENCE:
@example
@@ -419,8 +479,8 @@ It is not an error to unblock a signal which is not blocked.
#include <signal.h>
int kill(
- pid_t pid,
- int sig
+pid_t pid,
+int sig
);
@end example
@@ -444,25 +504,31 @@ This function sends the signal @code{sig} to the process @code{pid}.
@subheading NOTES:
NONE
-
+
+@c
+@c
+@c
@page
@subsection sigpending - Examine Pending Signals
-
+
+@findex sigpending
+@cindex examine pending signals
+
@subheading CALLING SEQUENCE:
-
+
@example
#include <signal.h>
-
+
int sigpending(
- const sigset_t *set
+const sigset_t *set
);
@end example
-
+
@subheading STATUS CODES:
On error, this routine returns -1 and sets @code{errno} to one of
the following:
-
+
@table @b
@item EFAULT
@@ -473,26 +539,32 @@ Invalid address for set.
@subheading DESCRIPTION:
This function allows the caller to examine the set of currently pending
-signals. A pending signal is one which has been raised but is currently
-blocked. The set of pending signals is returned in @code{set}.
-
+signals. A pending signal is one which has been raised but is currently
+blocked. The set of pending signals is returned in @code{set}.
+
@subheading NOTES:
NONE
+@c
+@c
+@c
@page
@subsection sigsuspend - Wait for a Signal
-
+
+@findex sigsuspend
+@cindex wait for a signal
+
@subheading CALLING SEQUENCE:
-
+
@example
#include <signal.h>
-
+
int sigsuspend(
- const sigset_t *sigmask
+const sigset_t *sigmask
);
@end example
-
+
@subheading STATUS CODES:
On error, this routine returns -1 and sets @code{errno} to one of
@@ -502,62 +574,74 @@ the following:
@item EINTR
Signal interrupted this function.
-
+
@end table
-
+
@subheading DESCRIPTION:
This function temporarily replaces the signal mask for the process
with that specified by @code{sigmask} and blocks the calling thread
until the signal is raised.
-
+
@subheading NOTES:
NONE
+@c
+@c
+@c
@page
@subsection pause - Suspend Process Execution
-
+
+@findex pause
+@cindex suspend process execution
+
@subheading CALLING SEQUENCE:
-
+
@example
#include <signal.h>
-
+
int pause( void );
@end example
-
+
@subheading STATUS CODES:
On error, this routine returns -1 and sets @code{errno} to one of
the following:
@table @b
-
+
@item EINTR
Signal interrupted this function.
-
+
@end table
-
+
@subheading DESCRIPTION:
This function causes the calling thread to be blocked until the signal
is received.
-
+
@subheading NOTES:
NONE
-
+
+@c
+@c
+@c
@page
@subsection sigwait - Synchronously Accept a Signal
+@findex sigwait
+@cindex synchronously accept a signal
+
@subheading CALLING SEQUENCE:
@example
#include <signal.h>
int sigwait(
- const sigset_t *set,
- int *sig
+const sigset_t *set,
+int *sig
);
@end example
@@ -582,29 +666,35 @@ returns the signal number for that signal in @code{sig}.
NONE
+@c
+@c
+@c
@page
@subsection sigwaitinfo - Synchronously Accept a Signal
-
+
+@findex sigwaitinfo
+@cindex synchronously accept a signal
+
@subheading CALLING SEQUENCE:
-
+
@example
#include <signal.h>
-
+
int sigwaitinfo(
- const sigset_t *set,
- siginfo_t *info
+const sigset_t *set,
+siginfo_t *info
);
@end example
-
+
@subheading STATUS CODES:
@table @b
@item EINTR
Signal interrupted this function.
-
+
@end table
-
+
@subheading DESCRIPTION:
-
+
This function selects a pending signal based on the set specified in
@code{set}, atomically clears it from the set of pending signals, and
returns information about that signal in @code{info}.
@@ -613,39 +703,45 @@ returns information about that signal in @code{info}.
NONE
+@c
+@c
+@c
@page
@subsection sigtimedwait - Synchronously Accept a Signal with Timeout
-
+
+@findex sigtimedwait
+@cindex synchronously accept a signal with timeout
+
@subheading CALLING SEQUENCE:
-
+
@example
#include <signal.h>
-
+
int sigtimedwait(
- const sigset_t *set,
- siginfo_t *info,
- const struct timespec *timeout
+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:
-
+
This function selects a pending signal based on the set specified in
@code{set}, atomically clears it from the set of pending signals, and
-returns information about that signal in @code{info}. The calling thread
+returns information about that signal in @code{info}. The calling thread
will block up to @code{timeout} waiting for the signal to arrive.
@subheading NOTES:
@@ -653,74 +749,86 @@ will block up to @code{timeout} waiting for the signal to arrive.
If @code{timeout} is NULL, then the calling thread will wait forever for
the specified signal set.
+@c
+@c
+@c
@page
@subsection sigqueue - Queue a Signal to a Process
-
+
+@findex sigqueue
+@cindex queue a signal to a process
+
@subheading CALLING SEQUENCE:
-
+
@example
#include <signal.h>
-
+
int sigqueue(
- pid_t pid,
- int signo,
- const union sigval value
+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
+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:
This function sends the signal specified by @code{signo} to the
process @code{pid}
-
+
@subheading NOTES:
NONE
+@c
+@c
+@c
@page
@subsection alarm - Schedule Alarm
-
+
+@findex alarm
+@cindex schedule alarm
+
@subheading CALLING SEQUENCE:
-
+
@example
#include <signal.h>
-
+
unsigned int alarm(
- unsigned int seconds
+unsigned int seconds
);
@end example
-
+
@subheading STATUS CODES:
This call always succeeds.
-
+
@subheading DESCRIPTION:
-
+
If there was a previous @code{alarm()} request with time remaining,
then this routine returns the number of seconds until that outstanding
-alarm would have fired. If no previous @code{alarm()} request was
+alarm would have fired. If no previous @code{alarm()} request was
outstanding, then zero is returned.
@subheading NOTES:
diff --git a/doc/posix_users/systemdb.t b/doc/posix_users/systemdb.t
index b8f1223288..0c341d3b45 100644
--- a/doc/posix_users/systemdb.t
+++ b/doc/posix_users/systemdb.t
@@ -1,16 +1,16 @@
@c
-@c COPYRIGHT (c) 1988-1998.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
+@c COPYRIGHT (c) 1988-1998.
+@c On-Line Applications Research Corporation (OAR).
+@c All rights reserved.
@c
-@c $Id$
+@c $Id$
@c
@chapter System Databases Manager
@section Introduction
-The
+The
system databases manager is ...
The directives provided by the system databases manager are:
@@ -22,7 +22,7 @@ The directives provided by the system databases manager are:
@item @code{getgrnam_r} - Reentrant Get Group File Entry for Name
@item @code{getpwuid} - Get Password File Entry for UID
@item @code{getpwuid_r} - Reentrant Get Password File Entry for UID
-@item @code{getpwnam} Get Password File Entry for Name
+@item @code{getpwnam} Get Password File Entry for Name
@item @code{getpwnam_r} - Reentrant Get Password File Entry for Name
@end itemize
@@ -41,9 +41,15 @@ A subsection is dedicated to each of this manager's directives
and describes the calling sequence, related constants, usage,
and status codes.
+@c
+@c
+@c
@page
@subsection getgrgid - Get Group File Entry for ID
+@findex getgrgid
+@cindex get group file entry for id
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -68,9 +74,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection getgrgid_r - Reentrant Get Group File Entry
+@findex getgrgid_r
+@cindex reentrant get group file entry
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -95,9 +107,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection getgrnam - Get Group File Entry for Name
+@findex getgrnam
+@cindex get group file entry for name
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -122,9 +140,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection getgrnam_r - Reentrant Get Group File Entry for Name
+@findex getgrnam_r
+@cindex reentrant get group file entry for name
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -149,9 +173,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection getpwuid - Get Password File Entry for UID
+@findex getpwuid
+@cindex get password file entry for uid
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -176,9 +206,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection getpwuid_r - Reentrant Get Password File Entry for UID
+@findex getpwuid_r
+@cindex reentrant get password file entry for uid
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -203,9 +239,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection getpwnam - Password File Entry for Name
+@findex getpwnam
+@cindex password file entry for name
+
@subheading CALLING SEQUENCE:
@ifset is-C
@@ -230,9 +272,15 @@ The
@subheading NOTES:
+@c
+@c
+@c
@page
@subsection getpwnam_r - Reentrant Get Password File Entry for Name
+@findex getpwnam_r
+@cindex reentrant get password file entry for name
+
@subheading CALLING SEQUENCE:
@ifset is-C
diff --git a/doc/posix_users/thread.t b/doc/posix_users/thread.t
index 98dcb13096..d755fdbd11 100644
--- a/doc/posix_users/thread.t
+++ b/doc/posix_users/thread.t
@@ -1,9 +1,9 @@
@c
-@c COPYRIGHT (c) 1988-1998.
-@c On-Line Applications Research Corporation (OAR).
-@c All rights reserved.
+@c COPYRIGHT (c) 1988-1998.
+@c On-Line Applications Research Corporation (OAR).
+@c All rights reserved.
@c
-@c $Id$
+@c $Id$
@c
@chapter Thread Manager
@@ -11,7 +11,7 @@
@section Introduction
The thread manager implements the functionality required of the thread
-manager as defined by POSIX 1003.1b-1996. This standard requires that
+manager as defined by POSIX 1003.1b-1996. This standard requires that
a compliant operating system provide the facilties to manage multiple
threads of control and defines the API that must be provided.
@@ -49,35 +49,35 @@ The services provided by the thread manager are:
@subsection Thread Attributes
-Thread attributes are utilized only at thread creation time. A thread
+Thread attributes are utilized only at thread creation time. A thread
attribute structure may be initialized and passed as an argument to
the @code{pthread_create} routine.
@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
+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
+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
+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
+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
@@ -98,9 +98,15 @@ A subsection is dedicated to each of this manager's services
and describes the calling sequence, related constants, usage,
and status codes.
+@c
+@c
+@c
@page
@subsection pthread_attr_init - Initialize a Thread Attribute Set
+@findex pthread_attr_init
+@cindex initialize a thread attribute set
+
@subheading CALLING SEQUENCE:
@@ -108,7 +114,7 @@ and status codes.
#include <pthread.h>
int pthread_attr_init(
- pthread_attr_t *attr
+pthread_attr_t *attr
);
@end example
@@ -128,7 +134,7 @@ individual attributes.
@subheading NOTES:
-The settings in the default attributes are implementation defined. For
+The settings in the default attributes are implementation defined. For
RTEMS, the default attributes are as follows:
@itemize @bullet
@@ -152,76 +158,88 @@ is set to @code{PTHREAD_CREATE_JOINABLE}.
@end itemize
+@c
+@c
+@c
@page
@subsection pthread_attr_destroy - Destroy a Thread Attribute Set
+@findex pthread_attr_destroy
+@cindex destroy a thread attribute set
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
-
+
int pthread_attr_destroy(
- pthread_attr_t *attr
+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:
The @code{pthread_attr_destroy} routine is used to destroy a thread
-attributes object. The behavior of using an attributes object after
+attributes object. The behavior of using an attributes object after
it is destroyed is implementation dependent.
@subheading NOTES:
NONE
+@c
+@c
+@c
@page
@subsection pthread_attr_setdetachstate - Set Detach State
+@findex pthread_attr_setdetachstate
+@cindex set detach state
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
-
+
int pthread_attr_setdetachstate(
- pthread_attr_t *attr,
- int detachstate
+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:
-The @code{pthread_attr_setdetachstate} routine is used to value of the
-@code{detachstate} attribute. This attribute controls whether the
-thread is created in a detached state.
+The @code{pthread_attr_setdetachstate} routine is used to value of the
+@code{detachstate} attribute. This attribute controls whether the
+thread is created in a detached state.
The @code{detachstate} can be either @code{PTHREAD_CREATE_DETACHED} or
-@code{PTHREAD_CREATE_JOINABLE}. The default value for all threads is
+@code{PTHREAD_CREATE_JOINABLE}. The default value for all threads is
@code{PTHREAD_CREATE_JOINABLE}.
@subheading NOTES:
@@ -230,34 +248,40 @@ If a thread is in a detached state,
then the use of the ID with the @code{pthread_detach} or
@code{pthread_join} routines is an error.
+@c
+@c
+@c
@page
@subsection pthread_attr_getdetachstate - Get Detach State
+@findex pthread_attr_getdetachstate
+@cindex get detach state
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
-
+
int pthread_attr_getdetachstate(
- const pthread_attr_t *attr,
- int *detachstate
+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:
The @code{pthread_attr_getdetachstate} routine is used to obtain the
@@ -268,31 +292,37 @@ by the @code{attr} thread attribute object.
NONE
+@c
+@c
+@c
@page
@subsection pthread_attr_setstacksize - Set Thread Stack Size
+@findex pthread_attr_setstacksize
+@cindex set thread stack size
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
-
+
int pthread_attr_setstacksize(
- pthread_attr_t *attr,
- size_t stacksize
+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:
The @code{pthread_attr_setstacksize} routine is used to set the
@@ -309,34 +339,40 @@ If the specified stacksize is below the minimum required for this CPU
(@code{PTHREAD_STACK_MIN}, then the stacksize will be set to the minimum
for this CPU.
+@c
+@c
+@c
@page
@subsection pthread_attr_getstacksize - Get Thread Stack Size
+@findex pthread_attr_getstacksize
+@cindex get thread stack size
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_attr_getstacksize(
- const pthread_attr_t *attr,
- size_t *stacksize
+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:
The @code{pthread_attr_getstacksize} routine is used to obtain the
@@ -349,22 +385,28 @@ As required by POSIX, RTEMS defines the feature symbol
@code{_POSIX_THREAD_ATTR_STACKSIZE} to indicate that this
routine is supported.
+@c
+@c
+@c
@page
@subsection pthread_attr_setstackaddr - Set Thread Stack Address
+@findex pthread_attr_setstackaddr
+@cindex set thread stack address
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
-
+
int pthread_attr_setstackaddr(
- pthread_attr_t *attr,
- void *stackaddr
+pthread_attr_t *attr,
+void *stackaddr
);
@end example
@subheading STATUS CODES:
-
+
@table @b
@item EINVAL
The attribute pointer argument is invalid.
@@ -373,7 +415,7 @@ The attribute pointer argument is invalid.
The attribute set is not initialized.
@end table
-
+
@subheading DESCRIPTION:
The @code{pthread_attr_setstackaddr} routine is used to set the
@@ -386,37 +428,43 @@ As required by POSIX, RTEMS defines the feature symbol
@code{_POSIX_THREAD_ATTR_STACKADDR} to indicate that this
routine is supported.
-It is imperative to the proper operation of the system that
+It is imperative to the proper operation of the system that
each thread have sufficient stack space.
+@c
+@c
+@c
@page
@subsection pthread_attr_getstackaddr - Get Thread Stack Address
+@findex pthread_attr_getstackaddr
+@cindex get thread stack address
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_attr_getstackaddr(
- const pthread_attr_t *attr,
- void **stackaddr
+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:
The @code{pthread_attr_getstackaddr} routine is used to obtain the
@@ -429,17 +477,23 @@ As required by POSIX, RTEMS defines the feature symbol
@code{_POSIX_THREAD_ATTR_STACKADDR} to indicate that this
routine is supported.
+@c
+@c
+@c
@page
@subsection pthread_attr_setscope - Set Thread Scheduling Scope
+@findex pthread_attr_setscope
+@cindex set thread scheduling scope
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_attr_setscope(
- pthread_attr_t *attr,
- int contentionscope
+pthread_attr_t *attr,
+int contentionscope
);
@end example
@@ -477,17 +531,23 @@ As required by POSIX, RTEMS defines the feature symbol
@code{_POSIX_THREAD_PRIORITY_SCHEDULING} to indicate that the
family of routines to which this routine belongs is supported.
+@c
+@c
+@c
@page
@subsection pthread_attr_getscope - Get Thread Scheduling Scope
+@findex pthread_attr_getscope
+@cindex get thread scheduling scope
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_attr_getscope(
- const pthread_attr_t *attr,
- int *contentionscope
+const pthread_attr_t *attr,
+int *contentionscope
);
@end example
@@ -509,7 +569,7 @@ The contentionscope pointer argument is invalid.
The @code{pthread_attr_getscope} routine is used to obtain the
value of the contention scope field in the thread attributes
-object @code{attr}. The current value is returned in
+object @code{attr}. The current value is returned in
@code{contentionscope}.
@subheading NOTES:
@@ -517,17 +577,23 @@ object @code{attr}. The current value is returned in
As required by POSIX, RTEMS defines the feature symbol
@code{_POSIX_THREAD_PRIORITY_SCHEDULING} to indicate that the
family of routines to which this routine belongs is supported.
+@c
+@c
+@c
@page
@subsection pthread_attr_setinheritsched - Set Inherit Scheduler Flag
+@findex pthread_attr_setinheritsched
+@cindex set inherit scheduler flag
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_attr_setinheritsched(
- pthread_attr_t *attr,
- int inheritsched
+pthread_attr_t *attr,
+int inheritsched
);
@end example
@@ -549,7 +615,7 @@ The specified scheduler inheritance argument is invalid.
The @code{pthread_attr_setinheritsched} routine is used to set the
inherit scheduler field in the thread attribute object @code{attr} to
-the value specified by @code{inheritsched}.
+the value specified by @code{inheritsched}.
The @code{contentionscope} must be either @code{PTHREAD_INHERIT_SCHED}
to indicate that the thread is to inherit the scheduling policy
@@ -566,17 +632,23 @@ As required by POSIX, RTEMS defines the feature symbol
@code{_POSIX_THREAD_PRIORITY_SCHEDULING} to indicate that the
family of routines to which this routine belongs is supported.
+@c
+@c
+@c
@page
@subsection pthread_attr_getinheritsched - Get Inherit Scheduler Flag
+@findex pthread_attr_getinheritsched
+@cindex get inherit scheduler flag
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_attr_getinheritsched(
- const pthread_attr_t *attr,
- int *inheritsched
+const pthread_attr_t *attr,
+int *inheritsched
);
@end example
@@ -605,17 +677,23 @@ As required by POSIX, RTEMS defines the feature symbol
@code{_POSIX_THREAD_PRIORITY_SCHEDULING} to indicate that the
family of routines to which this routine belongs is supported.
+@c
+@c
+@c
@page
@subsection pthread_attr_setschedpolicy - Set Scheduling Policy
+@findex pthread_attr_setschedpolicy
+@cindex set scheduling policy
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_attr_setschedpolicy(
- pthread_attr_t *attr,
- int policy
+pthread_attr_t *attr,
+int policy
);
@end example
@@ -626,7 +704,7 @@ The attribute pointer argument is invalid.
@item EINVAL
The attribute set is not initialized.
-
+
@item ENOTSUP
The specified scheduler policy argument is invalid.
@@ -659,17 +737,23 @@ As required by POSIX, RTEMS defines the feature symbol
@code{_POSIX_THREAD_PRIORITY_SCHEDULING} to indicate that the
family of routines to which this routine belongs is supported.
+@c
+@c
+@c
@page
@subsection pthread_attr_getschedpolicy - Get Scheduling Policy
+@findex pthread_attr_getschedpolicy
+@cindex get scheduling policy
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_attr_getschedpolicy(
- const pthread_attr_t *attr,
- int *policy
+const pthread_attr_t *attr,
+int *policy
);
@end example
@@ -698,17 +782,23 @@ As required by POSIX, RTEMS defines the feature symbol
@code{_POSIX_THREAD_PRIORITY_SCHEDULING} to indicate that the
family of routines to which this routine belongs is supported.
+@c
+@c
+@c
@page
@subsection pthread_attr_setschedparam - Set Scheduling Parameters
+@findex pthread_attr_setschedparam
+@cindex set scheduling parameters
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_attr_setschedparam(
- pthread_attr_t *attr,
- const struct sched_param param
+pthread_attr_t *attr,
+const struct sched_param param
);
@end example
@@ -719,7 +809,7 @@ The attribute pointer argument is invalid.
@item EINVAL
The attribute set is not initialized.
-
+
@item EINVAL
The specified scheduler parameter argument is invalid.
@@ -737,17 +827,23 @@ As required by POSIX, RTEMS defines the feature symbol
@code{_POSIX_THREAD_PRIORITY_SCHEDULING} to indicate that the
family of routines to which this routine belongs is supported.
+@c
+@c
+@c
@page
@subsection pthread_attr_getschedparam - Get Scheduling Parameters
+@findex pthread_attr_getschedparam
+@cindex get scheduling parameters
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_attr_getschedparam(
- const pthread_attr_t *attr,
- struct sched_param *param
+const pthread_attr_t *attr,
+struct sched_param *param
);
@end example
@@ -776,19 +872,25 @@ As required by POSIX, RTEMS defines the feature symbol
@code{_POSIX_THREAD_PRIORITY_SCHEDULING} to indicate that the
family of routines to which this routine belongs is supported.
+@c
+@c
+@c
@page
@subsection pthread_create - Create a Thread
+@findex pthread_create
+@cindex create a thread
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_create(
- pthread_t *thread,
- const pthread_attr_t *attr,
- void (*start_routine)( void * ),
- void *arg
+pthread_t *thread,
+const pthread_attr_t *attr,
+void (*start_routine)( void CVS Makefile cancel.t clock.t cond.t cspecific.t device.t files.t io.t j key.t memorymgmt.t message.t mutex.t nodesc nodescr posix_users.cps posix_users.fns posix_users.texi preface.texi procenv.t process.t psxmsg.t sched.t semaphores.t signal.t systemdb.t thread.t ),
+void *arg
);
@end example
@@ -800,7 +902,7 @@ int pthread_create(
The attribute set is not initialized.
@item EINVAL
-The user specified a stack address and the size of the area was not
+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
@@ -827,22 +929,22 @@ is invalid.
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:
-The @code{pthread_create} routine is used to create a new thread with
-the attributes specified by @code{attr}. If the @code{attr} argument
-is @code{NULL}, then the default attribute set will be used. Modification
+The @code{pthread_create} routine is used to create a new thread with
+the attributes specified by @code{attr}. If the @code{attr} argument
+is @code{NULL}, then the default attribute set will be used. Modification
of the contents of @code{attr} after this thread is created does not
-have an impact on this thread.
+have an impact on this thread.
The thread begins execution at the address specified by @code{start_routine}
-with @code{arg} as its only argument. If @code{start_routine} returns,
+with @code{arg} as its only argument. If @code{start_routine} returns,
then it is functionally equivalent to the thread executing the
@code{pthread_exit} service.
@@ -851,31 +953,37 @@ Upon successful completion, the ID of the created thread is returned in the
@subheading NOTES:
-There is no concept of a single main thread in RTEMS as there is in
-a tradition UNIX system. POSIX requires that the implicit return of
+There is no concept of a single main thread in RTEMS as there is in
+a tradition UNIX system. POSIX requires that the implicit return of
the main thread results in the same effects as if there were a call
-to @code{exit}. This does not occur in RTEMS.
+to @code{exit}. This does not occur in RTEMS.
The signal mask of the newly created thread is inherited from its
creator and the set of pending signals for this thread is empty.
+@c
+@c
+@c
@page
@subsection pthread_exit - Terminate the Current Thread
+@findex pthread_exit
+@cindex terminate the current thread
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
void pthread_exit(
- void *status
+void *status
);
@end example
@subheading STATUS CODES:
@table @b
@item NONE
-
+
@end table
@subheading DESCRIPTION:
@@ -884,45 +992,51 @@ The @code{pthread_exit} routine is used to temrinate the calling thread.
The @code{status} is made available to any successful join with the
terminating thread.
-When a thread returns from its start routine, it results in an
+When a thread returns from its start routine, it results in an
implicit call to the @code{pthread_exit} routine with the return
value of the function serving as the argument to @code{pthread_exit}.
@subheading NOTES:
-Any cancellation cleanup handlers that hace been pushed and not yet popped
-shall be popped in reverse of the order that they were pushed. After
+Any cancellation cleanup handlers that hace been pushed and not yet popped
+shall be popped in reverse of the order that they were pushed. After
all cancellation cleanup handlers have been executed, if the
thread has any thread-specific data, destructors for that data will
be invoked.
Thread termination does not release or free any application visible
resources including byt not limited to mutexes, file descriptors, allocated
-memory, etc.. Similarly, exitting a thread does not result in any
+memory, etc.. Similarly, exitting a thread does not result in any
process-oriented cleanup activity.
-There is no concept of a single main thread in RTEMS as there is in
-a tradition UNIX system. POSIX requires that the implicit return of
+There is no concept of a single main thread in RTEMS as there is in
+a tradition UNIX system. POSIX requires that the implicit return of
the main thread results in the same effects as if there were a call
-to @code{exit}. This does not occur in RTEMS.
+to @code{exit}. This does not occur in RTEMS.
All access to any automatic variables allocated by the threads is lost
-when the thread exits. Thus references (i.e. pointers) to local variables
-of a thread should not be used in a global manner without care. As
+when the thread exits. Thus references (i.e. pointers) to local variables
+of a thread should not be used in a global manner without care. As
a specific example, a pointer to a local variable should NOT be used
as the return value.
+@c
+@c
+@c
@page
@subsection pthread_detach - Detach a Thread
+@findex pthread_detach
+@cindex detach a thread
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_detach(
- pthread_t thread
+pthread_t thread
);
@end example
@@ -930,10 +1044,10 @@ int pthread_detach(
@table @b
@item ESRCH
The thread specified is invalid.
-
+
@item EINVAL
The thread specified is not a joinable thread.
-
+
@end table
@subheading DESCRIPTION:
@@ -945,20 +1059,26 @@ another thread joinging with it.
@subheading NOTES:
If any threads have previously joined with the specified thread, then they
-will remain joined with that thread. Any subsequent calls to
+will remain joined with that thread. Any subsequent calls to
@code{pthread_join} on the specified thread will fail.
+@c
+@c
+@c
@page
@subsection pthread_join - Wait for Thread Termination
+@findex pthread_join
+@cindex wait for thread termination
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_join(
- pthread_t thread,
- void **value_ptr
+pthread_t thread,
+void **value_ptr
);
@end example
@@ -966,37 +1086,43 @@ int pthread_join(
@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:
The @code{pthread_join} routine suspends execution of the calling thread
-until @code{thread} terminates. If @code{thread} has already terminated,
-then this routine returns immediately. The value returned by @code{thread}
+until @code{thread} terminates. If @code{thread} has already terminated,
+then this routine returns immediately. The value returned by @code{thread}
(i.e. passed to @code{pthread_exit} is returned in @code{value_ptr}.
-When this routine returns, then @code{thread} has been temrinated.
+When this routine returns, then @code{thread} has been temrinated.
@subheading NOTES:
The results of multiple simultaneous joins on the same thread is undefined.
If any threads have previously joined with the specified thread, then they
-will remain joined with that thread. Any subsequent calls to
+will remain joined with that thread. Any subsequent calls to
@code{pthread_join} on the specified thread will fail.
If value_ptr is NULL, then no value is returned.
+@c
+@c
+@c
@page
@subsection pthread_self - Get Thread ID
+@findex pthread_self
+@cindex get thread id
+
@subheading CALLING SEQUENCE:
@example
@@ -1017,17 +1143,23 @@ This routine returns the ID of the calling thread.
NONE
+@c
+@c
+@c
@page
@subsection pthread_equal - Compare Thread IDs
+@findex pthread_equal
+@cindex compare thread ids
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_equal(
- pthread_t t1,
- pthread_t t2
+pthread_t t1,
+pthread_t t2
);
@end example
@@ -1036,10 +1168,10 @@ int pthread_equal(
@table @b
@item zero
The thread ids are not equal.
-
+
@item non-zero
The thread ids are equal.
-
+
@end table
@subheading DESCRIPTION:
@@ -1051,9 +1183,15 @@ IDs and determine if they are equal.
The behavior is undefined if the thread IDs are not valid.
+@c
+@c
+@c
@page
@subsection pthread_once - Dynamic Package Initialization
+@findex pthread_once
+@cindex dynamic package initialization
+
@subheading CALLING SEQUENCE:
@example
@@ -1062,8 +1200,8 @@ The behavior is undefined if the thread IDs are not valid.
pthread_once_t once_control = PTHREAD_ONCE_INIT;
int pthread_once(
- pthread_once_t *once_control,
- void (*init_routine)(void)
+pthread_once_t *once_control,
+void (*init_routine)(void)
);
@end example
@@ -1074,10 +1212,10 @@ NONE
@subheading DESCRIPTION:
The @code{pthread_once} routine is used to provide controlled initialization
-of variables. The first call to @code{pthread_once} by any thread with the
+of variables. The first call to @code{pthread_once} by any thread with the
same @code{once_control} will result in the @code{init_routine} being
-invoked with no arguments. Subsequent calls to @code{pthread_once} with
-the same @code{once_control} will have no effect.
+invoked with no arguments. Subsequent calls to @code{pthread_once} with
+the same @code{once_control} will have no effect.
The @code{init_routine} is guaranteed to have run to completion when
this routine returns to the caller.
@@ -1088,18 +1226,24 @@ The behavior of @code{pthread_once} is undefined if @code{once_control}
is automatic storage (i.e. on a task stack) or is not initialized using
@code{PTHREAD_ONCE_INIT}.
+@c
+@c
+@c
@page
@subsection pthread_setschedparam - Set Thread Scheduling Parameters
+@findex pthread_setschedparam
+@cindex set thread scheduling parameters
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_setschedparam(
- pthread_t thread,
- int policy,
- struct sched_param *param
+pthread_t thread,
+int policy,
+struct sched_param *param
);
@end example
@@ -1129,7 +1273,7 @@ The thread indicated was invalid.
The @code{pthread_setschedparam} routine is used to set the
scheduler parameters currently associated with the thread specified
-by @code{thread} to the policy specified by @code{policy}. The
+by @code{thread} to the policy specified by @code{policy}. The
contents of @code{param} are interpreted based upon the @code{policy}
argument.
@@ -1139,23 +1283,29 @@ As required by POSIX, RTEMS defines the feature symbol
@code{_POSIX_THREAD_PRIORITY_SCHEDULING} to indicate that the
family of routines to which this routine belongs is supported.
+@c
+@c
+@c
@page
@subsection pthread_getschedparam - Get Thread Scheduling Parameters
+@findex pthread_getschedparam
+@cindex get thread scheduling parameters
+
@subheading CALLING SEQUENCE:
@example
#include <pthread.h>
int pthread_getschedparam(
- pthread_t thread,
- int *policy,
- struct sched_param *param
+pthread_t thread,
+int *policy,
+struct sched_param *param
);
@end example
@subheading STATUS CODES:
-
+
@table @b
@item EINVAL
The policy pointer argument is invalid.
@@ -1165,7 +1315,7 @@ The scheduling parameters pointer argument is invalid.
@item ESRCH
The thread indicated by the parameter thread is invalid.
-
+
@end table
@subheading DESCRIPTION: