Changeset d36d685 in rtems-docs


Ignore:
Timestamp:
Oct 12, 2017, 12:56:20 AM (22 months ago)
Author:
Joel Sherrill <joel@…>
Branches:
master
Children:
64564df
Parents:
21e0fcd
Message:

posix-users/thread.rst: Add pthread_getconcurrency and pthread_setconcurrency

Closes #2680.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • posix-users/thread.rst

    r21e0fcd rd36d685  
    5959
    6060- pthread_detach_ - Detach a Thread
     61
     62- pthread_getconcurrency_ - Get Thread Level of Concurrency
     63
     64- pthread_setconcurrency_ - Set Thread Level of Concurrency
    6165
    6266- pthread_getattr_np_ - Get Thread Attributes
     
    10621066specified thread will fail.
    10631067
     1068.. COMMENT: pthread_getconcurrency
     1069
     1070.. _pthread_getconcurrency:
     1071
     1072pthread_getconcurrency - Obtain Thread Concurrency
     1073--------------------------------------------------
     1074.. index:: pthread_getconcurrency
     1075.. index:: obtain thread concurrency
     1076
     1077**CALLING SEQUENCE:**
     1078
     1079.. code-block:: c
     1080
     1081    #include <pthread.h>
     1082    int pthread_getconcurrency(void);
     1083
     1084**STATUS CODES:**
     1085
     1086This method returns the current concurrency mapping value.
     1087
     1088**DESCRIPTION:**
     1089
     1090The ``pthread_getconcurrency`` method returns the number of user threads
     1091mapped onto kernel threads. For RTEMS, user and kernel threads are mapped
     10921:1 and per the POSIX standard this method returns 1 initially and
     1093the value last set by ``pthread_setconcurrency`` otherwise.
     1094
     1095**NOTES:**
     1096
     1097NONE
     1098
     1099.. COMMENT: pthread_setconcurrency
     1100
     1101.. _pthread_setconcurrency:
     1102
     1103pthread_setconcurrency - Set Thread Concurrency
     1104-----------------------------------------------
     1105.. index:: pthread_setconcurrency
     1106.. index:: obtain thread concurrency
     1107
     1108**CALLING SEQUENCE:**
     1109
     1110.. code-block:: c
     1111
     1112    #include <pthread.h>
     1113    int pthread_setconcurrency(void);
     1114
     1115**STATUS CODES:**
     1116
     1117This method returns 0 on success.
     1118
     1119**DESCRIPTION:**
     1120
     1121The ``pthread_setconcurrency`` method requests the number of user threads
     1122mapped onto kernel threads. Per the POSIX standard, this is considered
     1123a request and may have no impact.
     1124
     1125For RTEMS, user and kernel threads are always mapped 1:1 and thus this
     1126method has no change on the mapping. However, ``pthread_getconcurrency``
     1127will return the value set.
     1128
     1129**NOTES:**
     1130
     1131NONE
     1132
    10641133.. COMMENT: pthread_getattr_np
    10651134
Note: See TracChangeset for help on using the changeset viewer.