5
Line | |
---|
1 | #if HAVE_CONFIG_H |
---|
2 | #include "config.h" |
---|
3 | #endif |
---|
4 | |
---|
5 | /** |
---|
6 | * @file |
---|
7 | * |
---|
8 | * @brief Pthread Get/Set Concurrency |
---|
9 | * @ingroup POSIXAPI |
---|
10 | * |
---|
11 | * Per the Open Group specification, when user pthreads are mapped 1:1 |
---|
12 | * onto kernel threads, the implementation simply tracks an internal |
---|
13 | * variable whose initial value is 0. If it is set, subsequent calls to |
---|
14 | * obtain the value return that previously set. |
---|
15 | */ |
---|
16 | |
---|
17 | /* |
---|
18 | * COPYRIGHT (c) 2016. |
---|
19 | * On-Line Applications Research Corporation (OAR). |
---|
20 | * |
---|
21 | * The license and distribution terms for this file may be |
---|
22 | * found in the file LICENSE in this distribution or at |
---|
23 | * http://www.rtems.org/license/LICENSE. |
---|
24 | */ |
---|
25 | |
---|
26 | #include <pthread.h> |
---|
27 | #include <errno.h> |
---|
28 | |
---|
29 | static int pthread_concurrency_level; |
---|
30 | |
---|
31 | int pthread_getconcurrency(void) |
---|
32 | { |
---|
33 | return pthread_concurrency_level; |
---|
34 | } |
---|
35 | |
---|
36 | int pthread_setconcurrency( |
---|
37 | int new_level |
---|
38 | ) |
---|
39 | { |
---|
40 | pthread_concurrency_level = new_level; |
---|
41 | return 0; |
---|
42 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.