4.115
Last change
on this file since d7c3883 was
7ce892d,
checked in by Joel Sherrill <joel.sherrill@…>, on 02/14/11 at 17:50:23
|
2011-02-14 Joel Sherrill <joel.sherrilL@…>
- score/include/rtems/score/coremutex.h,
score/inline/rtems/score/coremutex.inl, score/src/apimutexallocate.c:
Fix direction of conditional and eliminate use of nesting is error
when POSIX is disabled.
|
-
Property mode set to
100644
|
File size:
840 bytes
|
Line | |
---|
1 | /* |
---|
2 | * COPYRIGHT (c) 1989-2007. |
---|
3 | * On-Line Applications Research Corporation (OAR). |
---|
4 | * |
---|
5 | * The license and distribution terms for this file may be |
---|
6 | * found in the file LICENSE in this distribution or at |
---|
7 | * http://www.rtems.com/license/LICENSE. |
---|
8 | * |
---|
9 | * $Id$ |
---|
10 | */ |
---|
11 | |
---|
12 | #if HAVE_CONFIG_H |
---|
13 | #include "config.h" |
---|
14 | #endif |
---|
15 | |
---|
16 | #include <rtems/system.h> |
---|
17 | #include <rtems/score/apimutex.h> |
---|
18 | |
---|
19 | void _API_Mutex_Allocate( |
---|
20 | API_Mutex_Control **the_mutex |
---|
21 | ) |
---|
22 | { |
---|
23 | API_Mutex_Control *mutex; |
---|
24 | |
---|
25 | CORE_mutex_Attributes attr = { |
---|
26 | CORE_MUTEX_NESTING_ACQUIRES, |
---|
27 | false, |
---|
28 | CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT, |
---|
29 | 0 |
---|
30 | }; |
---|
31 | |
---|
32 | mutex = (API_Mutex_Control *) _Objects_Allocate( &_API_Mutex_Information ); |
---|
33 | |
---|
34 | _CORE_mutex_Initialize( &mutex->Mutex, &attr, CORE_MUTEX_UNLOCKED ); |
---|
35 | |
---|
36 | _Objects_Open_u32( &_API_Mutex_Information, &mutex->Object, 1 ); |
---|
37 | |
---|
38 | *the_mutex = mutex; |
---|
39 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.