source: rtems/cpukit/itron/inline/rtems/itron/fmempool.inl @ c4a3f1e

Last change on this file since c4a3f1e was c4a3f1e, checked in by Joel Sherrill <joel.sherrill@…>, on 09/04/03 at 18:46:52

2003-09-04 Joel Sherrill <joel@…>

  • include/itron.h, include/itronsys/eventflags.h, include/itronsys/fmempool.h, include/itronsys/intr.h, include/itronsys/mbox.h, include/itronsys/msgbuffer.h, include/itronsys/network.h, include/itronsys/port.h, include/itronsys/semaphore.h, include/itronsys/status.h, include/itronsys/sysmgmt.h, include/itronsys/task.h, include/itronsys/time.h, include/itronsys/types.h, include/itronsys/vmempool.h, include/rtems/itron/config.h, include/rtems/itron/eventflags.h, include/rtems/itron/fmempool.h, include/rtems/itron/intr.h, include/rtems/itron/itronapi.h, include/rtems/itron/mbox.h, include/rtems/itron/msgbuffer.h, include/rtems/itron/network.h, include/rtems/itron/object.h, include/rtems/itron/port.h, include/rtems/itron/semaphore.h, include/rtems/itron/sysmgmt.h, include/rtems/itron/task.h, include/rtems/itron/time.h, include/rtems/itron/vmempool.h, inline/rtems/itron/eventflags.inl, inline/rtems/itron/fmempool.inl, inline/rtems/itron/intr.inl, inline/rtems/itron/mbox.inl, inline/rtems/itron/msgbuffer.inl, inline/rtems/itron/network.inl, inline/rtems/itron/port.inl, inline/rtems/itron/semaphore.inl, inline/rtems/itron/sysmgmt.inl, inline/rtems/itron/task.inl, inline/rtems/itron/time.inl, inline/rtems/itron/vmempool.inl, macros/rtems/itron/eventflags.inl, macros/rtems/itron/fmempool.inl, macros/rtems/itron/intr.inl, macros/rtems/itron/mbox.inl, macros/rtems/itron/msgbuffer.inl, macros/rtems/itron/network.inl, macros/rtems/itron/port.inl, macros/rtems/itron/semaphore.inl, macros/rtems/itron/sysmgmt.inl, macros/rtems/itron/task.inl, macros/rtems/itron/time.inl, macros/rtems/itron/vmempool.inl, src/can_wup.c, src/chg_pri.c, src/cre_mbf.c, src/cre_mbx.c, src/cre_sem.c, src/cre_tsk.c, src/del_mbf.c, src/del_mbx.c, src/del_sem.c, src/del_tsk.c, src/dis_dsp.c, src/ena_dsp.c, src/eventflags.c, src/exd_tsk.c, src/ext_tsk.c, src/fmempool.c, src/frsm_tsk.c, src/get_tid.c, src/itronintr.c, src/itronsem.c, src/itrontime.c, src/mbox.c, src/mboxtranslatereturncode.c, src/msgbuffer.c, src/msgbuffertranslatereturncode.c, src/network.c, src/port.c, src/prcv_mbf.c, src/prcv_mbx.c, src/preq_sem.c, src/psnd_mbf.c, src/rcv_mbf.c, src/rcv_mbx.c, src/ref_mbf.c, src/ref_mbx.c, src/ref_sem.c, src/ref_tsk.c, src/rel_wai.c, src/rot_rdq.c, src/rsm_tsk.c, src/sig_sem.c, src/slp_tsk.c, src/snd_mbf.c, src/snd_mbx.c, src/sta_tsk.c, src/sus_tsk.c, src/sysmgmt.c, src/task.c, src/ter_tsk.c, src/trcv_mbf.c, src/trcv_mbx.c, src/tslp_tsk.c, src/tsnd_mbf.c, src/twai_sem.c, src/vmempool.c, src/wai_sem.c, src/wup_tsk.c: URL for license changed.
  • Property mode set to 100644
File size: 3.9 KB
Line 
1/*
2 *  COPYRIGHT (c) 1989-1999.
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#ifndef __ITRON_FIXED_MEMORY_POOL_inl_
13#define __ITRON_FIXED_MEMORY_POOL_inl_
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19/*
20 *  _ITRON_Fixed_memory_pool_Allocate
21 *
22 *  DESCRIPTION:
23 *
24 *  This routine allocates the fixed_memory_pool associated with the specified
25 *  fixed_memory_pool ID from the pool of inactive fixed_memory_pools.
26 *
27 *  Input parameters:
28 *    mpfid   - id of fixed_memory_pool to allocate
29 *    status  - pointer to status variable
30 *
31 *  Output parameters:
32 *    returns - pointer to the fixed_memory_pool control block
33 *    *status - status
34 */
35
36RTEMS_INLINE_ROUTINE ITRON_Fixed_memory_pool_Control
37 *_ITRON_Fixed_memory_pool_Allocate(
38  ID   mpfid
39)
40{
41  return (ITRON_Fixed_memory_pool_Control *)_ITRON_Objects_Allocate_by_index(
42    &_ITRON_Fixed_memory_pool_Information,
43    mpfid,
44    sizeof(ITRON_Fixed_memory_pool_Control)
45  );
46}
47
48/*
49 *  _ITRON_Fixed_memory_pool_Clarify_allocation_id_error
50 *
51 *  This function is invoked when an object allocation ID error
52 *  occurs to determine the specific ITRON error code to return.
53 */
54
55#define _ITRON_Fixed_memory_pool_Clarify_allocation_id_error( _id ) \
56  _ITRON_Objects_Clarify_allocation_id_error( \
57      &_ITRON_Fixed_memory_pool_Information, (_id) )
58
59/*
60 *  _ITRON_Fixed_memory_pool_Clarify_get_id_error
61 *
62 *  This function is invoked when an object get ID error
63 *  occurs to determine the specific ITRON error code to return.
64 */
65
66#define _ITRON_Fixed_memory_pool_Clarify_get_id_error( _id ) \
67 _ITRON_Objects_Clarify_get_id_error( \
68    &_ITRON_Fixed_memory_pool_Information, (_id) )
69
70/*
71 *  _ITRON_Fixed_memory_pool_Free
72 *
73 *  DESCRIPTION:
74 *
75 *  This routine frees a fixed_memory_pool control block to the
76 *  inactive chain of free fixed_memory_pool control blocks.
77 *
78 *  Input parameters:
79 *    the_fixed_memory_pool - pointer to fixed_memory_pool control block
80 *
81 *  Output parameters: NONE
82 */
83
84RTEMS_INLINE_ROUTINE void _ITRON_Fixed_memory_pool_Free (
85  ITRON_Fixed_memory_pool_Control *the_fixed_memory_pool
86)
87{
88  _ITRON_Objects_Free(
89    &_ITRON_Fixed_memory_pool_Information,
90    &the_fixed_memory_pool->Object
91  );
92}
93
94/*PAGE
95 *
96 *  _ITRON_Fixed_memory_pool_Get
97 *
98 *  DESCRIPTION:
99 *
100 *  This function maps fixed memory pool IDs to control blocks.
101 *  If ID corresponds to a local fixed memory pool, then it returns
102 *  the_fixed memory pool control pointer which maps to ID and location
103 *  is set to OBJECTS_LOCAL.  if the fixed memory pool ID is global and
104 *  resides on a remote node, then location is set to OBJECTS_REMOTE,
105 *  and the fixed memory pool is undefined.  Otherwise, location is set
106 *  to OBJECTS_ERROR and the fixed memory pool is undefined.
107 *
108 *  Input parameters:
109 *    id            - ITRON fixed memory pool ID.
110 *    the_location  - pointer to a location variable
111 *
112 *  Output parameters:
113 *    *the_location  - location of the object
114 */
115
116RTEMS_INLINE_ROUTINE ITRON_Fixed_memory_pool_Control
117  *_ITRON_Fixed_memory_pool_Get (
118  ID                 id,
119  Objects_Locations *location
120)
121{
122  return (ITRON_Fixed_memory_pool_Control *)
123    _ITRON_Objects_Get( &_ITRON_Fixed_memory_pool_Information, id, location );
124}
125
126/*PAGE
127 *
128 *  _ITRON_Fixed_memory_pool_Is_null
129 *
130 *  This function returns TRUE if the_fixed_memory_pool is NULL
131 *  and FALSE otherwise.
132 *
133 *  Input parameters:
134 *    the_fixed_memory_pool - pointer to fixed_memory_pool control block
135 *
136 *  Output parameters:
137 *    TRUE  - if the_fixed_memory_pool is NULL
138 *    FALSE - otherwise
139 */
140
141RTEMS_INLINE_ROUTINE boolean _ITRON_Fixed_memory_pool_Is_null (
142  ITRON_Fixed_memory_pool_Control *the_fixed_memory_pool
143)
144{
145  return ( the_fixed_memory_pool == NULL );
146}
147
148/* 
149 *  XXX insert inline routines here
150 */
151
152#ifdef __cplusplus
153}
154#endif
155
156#endif
157/* end of include file */
158
Note: See TracBrowser for help on using the repository browser.