4.115
Last change
on this file since be1b8a7 was
0c5317d,
checked in by Sebastian Huber <sebastian.huber@…>, on 07/19/13 at 12:33:56
|
posix: Create pthread implementation header
Move implementation specific parts of pthread.h and pthread.inl into new
header file pthreadimpl.h. The pthread.h contains now only the
application visible API.
|
-
Property mode set to
100644
|
File size:
969 bytes
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief Function Sets the Contentionscope Attribute in the attr Object |
---|
5 | * @ingroup POSIXAPI |
---|
6 | */ |
---|
7 | |
---|
8 | /* |
---|
9 | * 13.5.1 Thread Creation Scheduling Attributes, P1003.1c/Draft 10, p. 120 |
---|
10 | * |
---|
11 | * COPYRIGHT (c) 1989-1999. |
---|
12 | * On-Line Applications Research Corporation (OAR). |
---|
13 | * |
---|
14 | * The license and distribution terms for this file may be |
---|
15 | * found in the file LICENSE in this distribution or at |
---|
16 | * http://www.rtems.com/license/LICENSE. |
---|
17 | */ |
---|
18 | |
---|
19 | #if HAVE_CONFIG_H |
---|
20 | #include "config.h" |
---|
21 | #endif |
---|
22 | |
---|
23 | #include <pthread.h> |
---|
24 | #include <errno.h> |
---|
25 | |
---|
26 | #include <rtems/system.h> |
---|
27 | #include <rtems/posix/pthreadimpl.h> |
---|
28 | |
---|
29 | int pthread_attr_setscope( |
---|
30 | pthread_attr_t *attr, |
---|
31 | int contentionscope |
---|
32 | ) |
---|
33 | { |
---|
34 | if ( !attr || !attr->is_initialized ) |
---|
35 | return EINVAL; |
---|
36 | |
---|
37 | switch ( contentionscope ) { |
---|
38 | case PTHREAD_SCOPE_PROCESS: |
---|
39 | attr->contentionscope = contentionscope; |
---|
40 | return 0; |
---|
41 | |
---|
42 | case PTHREAD_SCOPE_SYSTEM: |
---|
43 | return ENOTSUP; |
---|
44 | |
---|
45 | default: |
---|
46 | return EINVAL; |
---|
47 | } |
---|
48 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.