source: rtems/cpukit/score/src/apimutexallocate.c @ 9b4422a2

4.115
Last change on this file since 9b4422a2 was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 828 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
10#if HAVE_CONFIG_H
11#include "config.h"
12#endif
13
14#include <rtems/system.h>
15#include <rtems/score/apimutex.h>
16
17void _API_Mutex_Allocate(
18  API_Mutex_Control **the_mutex
19)
20{
21  API_Mutex_Control *mutex;
22
23  CORE_mutex_Attributes attr =  {
24    CORE_MUTEX_NESTING_ACQUIRES,
25    false,
26    CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT,
27    0
28  };
29
30  mutex = (API_Mutex_Control *) _Objects_Allocate( &_API_Mutex_Information );
31
32  _CORE_mutex_Initialize( &mutex->Mutex, &attr, CORE_MUTEX_UNLOCKED );
33
34  _Objects_Open_u32( &_API_Mutex_Information, &mutex->Object, 1 );
35
36  *the_mutex = mutex;
37}
Note: See TracBrowser for help on using the repository browser.