source: rtems/cpukit/rtems/macros/rtems/rtems/part.inl @ 1d496f6

4.104.114.84.95
Last change on this file since 1d496f6 was 1d496f6, checked in by Ralf Corsepius <ralf.corsepius@…>, on 03/29/04 at 16:04:42

2004-03-29 Ralf Corsepius <ralf_corsepius@…>

  • rtems/include/rtems.h, rtems/include/rtems/rtems/asr.h, rtems/include/rtems/rtems/attr.h, rtems/include/rtems/rtems/clock.h, rtems/include/rtems/rtems/config.h, rtems/include/rtems/rtems/dpmem.h, rtems/include/rtems/rtems/eventset.h, rtems/include/rtems/rtems/message.h, rtems/include/rtems/rtems/modes.h, rtems/include/rtems/rtems/msgmp.h, rtems/include/rtems/rtems/options.h, rtems/include/rtems/rtems/part.h, rtems/include/rtems/rtems/ratemon.h, rtems/include/rtems/rtems/region.h, rtems/include/rtems/rtems/regionmp.h, rtems/include/rtems/rtems/sem.h, rtems/include/rtems/rtems/support.h, rtems/include/rtems/rtems/taskmp.h, rtems/include/rtems/rtems/tasks.h, rtems/include/rtems/rtems/timer.h, rtems/inline/rtems/rtems/part.inl, rtems/inline/rtems/rtems/region.inl, rtems/macros/rtems/rtems/part.inl, rtems/src/attr.c, rtems/src/dpmem.c, rtems/src/dpmemcreate.c, rtems/src/dpmemexternal2internal.c, rtems/src/dpmeminternal2external.c, rtems/src/eventseize.c, rtems/src/msg.c, rtems/src/msgmp.c, rtems/src/msgqallocate.c, rtems/src/msgqbroadcast.c, rtems/src/msgqcreate.c, rtems/src/msgqflush.c, rtems/src/msgqgetnumberpending.c, rtems/src/msgqident.c, rtems/src/msgqreceive.c, rtems/src/msgqsend.c, rtems/src/msgqsubmit.c, rtems/src/msgqtranslatereturncode.c, rtems/src/msgqurgent.c, rtems/src/part.c, rtems/src/partcreate.c, rtems/src/partident.c, rtems/src/partmp.c, rtems/src/ratemon.c, rtems/src/region.c, rtems/src/regioncreate.c, rtems/src/regionextend.c, rtems/src/regiongetsegment.c, rtems/src/regiongetsegmentsize.c, rtems/src/regionmp.c, rtems/src/regionreturnsegment.c, rtems/src/rtemstimer.c, rtems/src/sem.c, rtems/src/semcreate.c, rtems/src/semident.c, rtems/src/semmp.c, rtems/src/semobtain.c, rtems/src/semtranslatereturncode.c, rtems/src/taskcreate.c, rtems/src/taskgetnote.c, rtems/src/taskident.c, rtems/src/taskinitusers.c, rtems/src/taskmp.c, rtems/src/taskrestart.c, rtems/src/tasks.c, rtems/src/tasksetnote.c, rtems/src/taskstart.c, rtems/src/timerserver.c: Convert to using c99 fixed size types.
  • Property mode set to 100644
File size: 2.3 KB
Line 
1/*  part.inl
2 *
3 *  This file contains the macro implementation of all inlined routines
4 *  in the Partition Manager.
5 *
6 *  COPYRIGHT (c) 1989-1999.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.rtems.com/license/LICENSE.
12 *
13 *  $Id$
14 */
15
16#ifndef __PARTITION_inl
17#define __PARTITION_inl
18
19/*PAGE
20 *
21 *  _Partition_Allocate_buffer
22 *
23 */
24
25#define _Partition_Allocate_buffer( _the_partition ) \
26  _Chain_Get( &(_the_partition)->Memory )
27
28/*PAGE
29 *
30 *  _Partition_Free_buffer
31 *
32 */
33
34#define _Partition_Free_buffer( _the_partition, _the_buffer ) \
35  _Chain_Append( &(_the_partition)->Memory, (_the_buffer) )
36
37/*PAGE
38 *
39 *  _Partition_Is_buffer_on_boundary
40 *
41 */
42
43#define _Partition_Is_buffer_on_boundary( _the_buffer, _the_partition ) \
44  ((((uint32_t  ) _Addresses_Subtract( \
45                    (_the_buffer), \
46                    (_the_partition)->starting_address ) \
47                  ) % \
48                  (_the_partition)->buffer_size) == 0)
49
50/*PAGE
51 *
52 *  _Partition_Is_buffer_valid
53 *
54 */
55
56#define _Partition_Is_buffer_valid( _the_buffer, _the_partition ) \
57  ( \
58    _Addresses_Is_in_range( \
59      (_the_buffer), \
60      (_the_partition)->starting_address, \
61      _Addresses_Add_offset( \
62         (_the_partition)->starting_address, \
63         (_the_partition)->length \
64      ) \
65    ) && \
66    _Partition_Is_buffer_on_boundary( (_the_buffer), (_the_partition) ) \
67  )
68
69/*PAGE
70 *
71 *  _Partition_Is_buffer_size_aligned
72 *
73 */
74
75#define _Partition_Is_buffer_size_aligned( _buffer_size ) \
76  ((_buffer_size) % CPU_PARTITION_ALIGNMENT == 0)
77
78/*PAGE
79 *
80 *  _Partition_Allocate
81 *
82 */
83
84#define _Partition_Allocate() \
85  (Partition_Control *) _Objects_Allocate( &_Partition_Information )
86
87/*PAGE
88 *
89 *  _Partition_Free
90 *
91 */
92
93#define _Partition_Free( _the_partition ) \
94  _Objects_Free( &_Partition_Information, &(_the_partition)->Object )
95
96/*PAGE
97 *
98 *  _Partition_Get
99 *
100 */
101
102#define _Partition_Get( _id, _location ) \
103  (Partition_Control *) \
104    _Objects_Get( &_Partition_Information, (_id), (_location) )
105
106/*PAGE
107 *
108 *  _Partition_Is_null
109 *
110 */
111
112#define _Partition_Is_null( _the_partition ) \
113   ( (_the_partition) == NULL  )
114
115#endif
116/* end of include file */
Note: See TracBrowser for help on using the repository browser.