From fa70fd20878e402610c263f129266593d31a0376 Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Fri, 26 Feb 2016 18:22:07 +1100 Subject: POSIX User clean up. --- posix_users/condition_variable.rst | 215 ++++++++++++++++++++++--------------- 1 file changed, 127 insertions(+), 88 deletions(-) (limited to 'posix_users/condition_variable.rst') diff --git a/posix_users/condition_variable.rst b/posix_users/condition_variable.rst index d940e33..2584d77 100644 --- a/posix_users/condition_variable.rst +++ b/posix_users/condition_variable.rst @@ -1,3 +1,7 @@ +.. COMMENT: COPYRIGHT (c) 1988-2002. +.. COMMENT: On-Line Applications Research Corporation (OAR). +.. COMMENT: All rights reserved. + Condition Variable Manager ########################## @@ -8,25 +12,25 @@ The condition variable manager ... The directives provided by the condition variable manager are: -- ``pthread_condattr_init`` - Initialize a Condition Variable Attribute Set +- pthread_condattr_init_ - Initialize a Condition Variable Attribute Set -- ``pthread_condattr_destroy`` - Destroy a Condition Variable Attribute Set +- pthread_condattr_destroy_ - Destroy a Condition Variable Attribute Set -- ``pthread_condattr_setpshared`` - Set Process Shared Attribute +- pthread_condattr_setpshared_ - Set Process Shared Attribute -- ``pthread_condattr_getpshared`` - Get Process Shared Attribute +- pthread_condattr_getpshared_ - Get Process Shared Attribute -- ``pthread_cond_init`` - Initialize a Condition Variable +- pthread_cond_init_ - Initialize a Condition Variable -- ``pthread_cond_destroy`` - Destroy a Condition Variable +- pthread_cond_destroy_ - Destroy a Condition Variable -- ``pthread_cond_signal`` - Signal a Condition Variable +- pthread_cond_signal_ - Signal a Condition Variable -- ``pthread_cond_broadcast`` - Broadcast a Condition Variable +- pthread_cond_broadcast_ - Broadcast a Condition Variable -- ``pthread_cond_wait`` - Wait on a Condition Variable +- pthread_cond_wait_ - Wait on a Condition Variable -- ``pthread_cond_timedwait`` - With with Timeout a Condition Variable +- pthread_cond_timedwait_ - With with Timeout a Condition Variable Background ========== @@ -41,10 +45,11 @@ There is currently no text in this section. Directives ========== -This section details the condition variable manager's directives. -A subsection is dedicated to each of this manager's directives -and describes the calling sequence, related constants, usage, -and status codes. +This section details the condition variable manager's directives. A subsection +is dedicated to each of this manager's directives and describes the calling +sequence, related constants, usage, and status codes. + +.. _pthread_condattr_init: pthread_condattr_init - Initialize a Condition Variable Attribute Set --------------------------------------------------------------------- @@ -53,23 +58,25 @@ pthread_condattr_init - Initialize a Condition Variable Attribute Set **CALLING SEQUENCE:** -.. code:: c +.. code-block:: c #include int pthread_condattr_init( - pthread_condattr_t \*attr + pthread_condattr_t *attr ); **STATUS CODES:** -*ENOMEM* - Insufficient memory is available to initialize the condition variable - attributes object. + * - ``ENOMEM`` + - Insufficient memory is available to initialize the condition variable + attributes object. **DESCRIPTION:** **NOTES:** +.. _pthread_condattr_destroy: + pthread_condattr_destroy - Destroy a Condition Variable Attribute Set --------------------------------------------------------------------- .. index:: pthread_condattr_destroy @@ -77,22 +84,27 @@ pthread_condattr_destroy - Destroy a Condition Variable Attribute Set **CALLING SEQUENCE:** -.. code:: c +.. code-block:: c #include int pthread_condattr_destroy( - pthread_condattr_t \*attr + pthread_condattr_t *attr ); **STATUS CODES:** -*EINVAL* - The attribute object specified is invalid. +.. list-table:: + :class: rtems-table + + * - ``EINVAL`` + - The attribute object specified is invalid. **DESCRIPTION:** **NOTES:** +.. _pthread_condattr_setpshared: + pthread_condattr_setpshared - Set Process Shared Attribute ---------------------------------------------------------- .. index:: pthread_condattr_setpshared @@ -100,23 +112,28 @@ pthread_condattr_setpshared - Set Process Shared Attribute **CALLING SEQUENCE:** -.. code:: c +.. code-block:: c #include int pthread_condattr_setpshared( - pthread_condattr_t \*attr, - int pshared + pthread_condattr_t *attr, + int pshared ); **STATUS CODES:** -*EINVAL* - Invalid argument passed. +.. list-table:: + :class: rtems-table + + * - ``EINVAL`` + - Invalid argument passed. **DESCRIPTION:** **NOTES:** +.. _pthread_condattr_getpshared: + pthread_condattr_getpshared - Get Process Shared Attribute ---------------------------------------------------------- .. index:: pthread_condattr_getpshared @@ -124,23 +141,28 @@ pthread_condattr_getpshared - Get Process Shared Attribute **CALLING SEQUENCE:** -.. code:: c +.. code-block:: c #include int pthread_condattr_getpshared( - const pthread_condattr_t \*attr, - int \*pshared + const pthread_condattr_t *attr, + int *pshared ); **STATUS CODES:** -*EINVAL* - Invalid argument passed. +.. list-table:: + :class: rtems-table + + * - ``EINVAL`` + - Invalid argument passed. **DESCRIPTION:** **NOTES:** +.. _pthread_cond_init: + pthread_cond_init - Initialize a Condition Variable --------------------------------------------------- .. index:: pthread_cond_init @@ -148,33 +170,36 @@ pthread_cond_init - Initialize a Condition Variable **CALLING SEQUENCE:** -.. code:: c +.. code-block:: c #include int pthread_cond_init( - pthread_cond_t \*cond, - const pthread_condattr_t \*attr + pthread_cond_t *cond, + const pthread_condattr_t *attr ); **STATUS CODES:** -*EAGAIN* - The system lacked a resource other than memory necessary to create the - initialize the condition variable object. +.. list-table:: + :class: rtems-table -*ENOMEM* - Insufficient memory is available to initialize the condition variable object. - -*EBUSY* - The specified condition variable has already been initialized. - -*EINVAL* - The specified attribute value is invalid. + * - ``EAGAIN`` + - The system lacked a resource other than memory necessary to create the + initialize the condition variable object. + * - ``ENOMEM`` + - Insufficient memory is available to initialize the condition variable + object. + * - ``EBUSY`` + - The specified condition variable has already been initialized. + * - ``EINVAL`` + - The specified attribute value is invalid. **DESCRIPTION:** **NOTES:** +.. _pthread_cond_destroy: + pthread_cond_destroy - Destroy a Condition Variable --------------------------------------------------- .. index:: pthread_cond_destroy @@ -182,25 +207,29 @@ pthread_cond_destroy - Destroy a Condition Variable **CALLING SEQUENCE:** -.. code:: c +.. code-block:: c #include int pthread_cond_destroy( - pthread_cond_t \*cond + pthread_cond_t *cond ); **STATUS CODES:** -*EINVAL* - The specified condition variable is invalid. +.. list-table:: + :class: rtems-table -*EBUSY* - The specified condition variable is currently in use. + * - ``EINVAL`` + - The specified condition variable is invalid. + * - ``EBUSY`` + - The specified condition variable is currently in use. **DESCRIPTION:** **NOTES:** +.. _pthread_cond_signal: + pthread_cond_signal - Signal a Condition Variable ------------------------------------------------- .. index:: pthread_cond_signal @@ -208,17 +237,20 @@ pthread_cond_signal - Signal a Condition Variable **CALLING SEQUENCE:** -.. code:: c +.. code-block:: c #include int pthread_cond_signal( - pthread_cond_t \*cond + pthread_cond_t *cond ); **STATUS CODES:** -*EINVAL* - The specified condition variable is not valid. +.. list-table:: + :class: rtems-table + + * - ``EINVAL`` + - The specified condition variable is not valid. **DESCRIPTION:** @@ -227,6 +259,8 @@ pthread_cond_signal - Signal a Condition Variable This routine should not be invoked from a handler from an asynchronous signal handler or an interrupt service routine. +.. _pthread_cond_broadcast: + pthread_cond_broadcast - Broadcast a Condition Variable ------------------------------------------------------- .. index:: pthread_cond_broadcast @@ -234,17 +268,20 @@ pthread_cond_broadcast - Broadcast a Condition Variable **CALLING SEQUENCE:** -.. code:: c +.. code-block:: c #include int pthread_cond_broadcast( - pthread_cond_t \*cond + pthread_cond_t *cond ); **STATUS CODES:** -*EINVAL* - The specified condition variable is not valid. +.. list-table:: + :class: rtems-table + + * - ``EINVAL`` + - The specified condition variable is not valid. **DESCRIPTION:** @@ -253,6 +290,8 @@ pthread_cond_broadcast - Broadcast a Condition Variable This routine should not be invoked from a handler from an asynchronous signal handler or an interrupt service routine. +.. _pthread_cond_wait: + pthread_cond_wait - Wait on a Condition Variable ------------------------------------------------ .. index:: pthread_cond_wait @@ -260,26 +299,31 @@ pthread_cond_wait - Wait on a Condition Variable **CALLING SEQUENCE:** -.. code:: c +.. code-block:: c #include int pthread_cond_wait( - pthread_cond_t \*cond, - pthread_mutex_t \*mutex + pthread_cond_t *cond, + pthread_mutex_t *mutex ); **STATUS CODES:** -*EINVAL* - The specified condition variable or mutex is not initialized OR different - mutexes were specified for concurrent pthread_cond_wait() and - pthread_cond_timedwait() operations on the same condition variable OR - the mutex was not owned by the current thread at the time of the call. +.. list-table:: + :class: rtems-table + + * - ``EINVAL`` + - The specified condition variable or mutex is not initialized OR different + mutexes were specified for concurrent ``pthread_cond_wait()`` and + ``pthread_cond_timedwait()`` operations on the same condition variable OR + the mutex was not owned by the current thread at the time of the call. **DESCRIPTION:** **NOTES:** +.. _pthread_cond_timedwait: + pthread_cond_timedwait - Wait with Timeout a Condition Variable --------------------------------------------------------------- .. index:: pthread_cond_timedwait @@ -287,34 +331,29 @@ pthread_cond_timedwait - Wait with Timeout a Condition Variable **CALLING SEQUENCE:** -.. code:: c +.. code-block:: c #include 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 ); **STATUS CODES:** -*EINVAL* - The specified condition variable or mutex is not initialized OR different - mutexes were specified for concurrent pthread_cond_wait() and - pthread_cond_timedwait() operations on the same condition variable OR - the mutex was not owned by the current thread at the time of the call. +.. list-table:: + :class: rtems-table -*ETIMEDOUT* - The specified time has elapsed without the condition variable being - satisfied. + * - ``EINVAL`` + - The specified condition variable or mutex is not initialized OR different + mutexes were specified for concurrent ``pthread_cond_wait()`` and + ``pthread_cond_timedwait()`` operations on the same condition variable OR + the mutex was not owned by the current thread at the time of the call. + * - ``ETIMEDOUT`` + - The specified time has elapsed without the condition variable being + satisfied. **DESCRIPTION:** **NOTES:** - -.. COMMENT: COPYRIGHT (c) 1988-2002. - -.. COMMENT: On-Line Applications Research Corporation (OAR). - -.. COMMENT: All rights reserved. - -- cgit v1.2.3