source: rtems/cpukit/posix/inline/rtems/posix/mutex.inl @ ef49476

4.104.114.95
Last change on this file since ef49476 was ef49476, checked in by Ralf Corsepius <ralf.corsepius@…>, on 08/19/08 at 08:32:59

Add header guard to force indirect inclusion.

  • Property mode set to 100644
File size: 1.2 KB
Line 
1/**
2 * @file rtems/posix/mutex.inl
3 */
4
5/*  rtems/posix/mutex.inl
6 *
7 *  This include file contains the static inline implementation of the private
8 *  inlined routines for POSIX mutex's.
9 *
10 *  COPYRIGHT (c) 1989-1999.
11 *  On-Line Applications Research Corporation (OAR).
12 *
13 *  The license and distribution terms for this file may be
14 *  found in the file LICENSE in this distribution or at
15 *  http://www.rtems.com/license/LICENSE.
16 *
17 *  $Id$
18 */
19 
20#ifndef _RTEMS_POSIX_MUTEX_H
21# error "Never use <rtems/posix/mutex.inl> directly; include <rtems/posix/mutex.h> instead."
22#endif
23
24#ifndef _RTEMS_POSIX_MUTEX_INL
25#define _RTEMS_POSIX_MUTEX_INL
26 
27/*PAGE
28 *
29 *  _POSIX_Mutex_Allocate
30 */
31 
32RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void )
33{
34  return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information );
35}
36 
37/*PAGE
38 *
39 *  _POSIX_Mutex_Free
40 */
41 
42RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free (
43  POSIX_Mutex_Control *the_mutex
44)
45{
46  _Objects_Free( &_POSIX_Mutex_Information, &the_mutex->Object );
47}
48 
49/*PAGE
50 *
51 *  _POSIX_Mutex_Is_null
52 */
53 
54RTEMS_INLINE_ROUTINE boolean _POSIX_Mutex_Is_null (
55  POSIX_Mutex_Control *the_mutex
56)
57{
58  return !the_mutex;
59}
60
61#endif
62/*  end of include file */
63
Note: See TracBrowser for help on using the repository browser.