source: rtems/cpukit/itron/include/itronsys/fmempool.h @ 6df1f64

4.104.114.84.95
Last change on this file since 6df1f64 was 6df1f64, checked in by Ralf Corsepius <ralf.corsepius@…>, on 01/28/05 at 11:07:14

New header guards.

  • Property mode set to 100644
File size: 2.1 KB
Line 
1/**
2 * @file itronsys/fmempool.h
3 */
4
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 _ITRONSYS_FMEMPOOL_H
17#define _ITRONSYS_FMEMPOOL_H
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23/*
24 *  Create Fixed Memory Pool (cre_mpf) Structure
25 */
26
27    /* cre_mpf */
28typedef struct t_cmpf {
29  VP    exinf;     /* extended information */
30  ATR   mpfatr;    /* memorypool attributes */
31  INT   mpfcnt;    /* block count for entire memorypool */
32  INT   blfsz;     /* fixed-size memory block size */
33  /* additional information may be included depending on the implementation */
34} T_CMPF;
35
36/*
37 *  mpfatr
38 */
39
40#define TA_TFIFO   0x00   /* waiting tasks are handled by FIFO */
41#define TA_TPRI    0x01   /* waiting tasks are handled by priority */
42
43
44/*
45 *  Reference Fixed Memory Pool (ref_mpf) Structure
46 */
47
48    /* ref_mpf */
49typedef struct t_rmpf {
50  VP        exinf;    /* extended information */
51  BOOL_ID   wtsk;     /* indicates whether or not there are waiting tasks */
52  INT       frbcnt;   /* free block count */
53  /* additional information may be included depending on the implementation */
54} T_RMPF;
55
56/*
57 *  Fixed Memory Pool Functions
58 */
59
60/*
61 *  cre_mpf - Create Fixed-Size Memorypool
62 */
63
64ER cre_mpf(
65  ID mpfid,
66  T_CMPF *pk_cmpf
67);
68
69/*
70 *  del_mpf - Delete Fixed-Size Memorypool
71 */
72
73ER del_mpf(
74  ID mpfid
75);
76
77/*
78 *  get_blf - Get Fixed-Size Memory Block
79 */
80
81ER get_blf(
82  VP *p_blf,
83  ID mpfid
84);
85
86/*
87 *  pget_blf - Poll and Get Fixed-Size Memory Block
88 */
89
90ER pget_blf(
91  VP *p_blf,
92  ID mpfid
93);
94
95/*
96 *  tget_blf - Get Fixed-Size Memory Block with Timeout
97 */
98
99ER tget_blf(
100  VP *p_blf,
101  ID mpfid,
102  TMO tmout
103);
104
105/*
106 *  rel_blf - Release Fixed-Size Memory Block
107 */
108
109ER rel_blf(
110  ID mpfid,
111  VP blf
112);
113
114/*
115 *  ref_mpf - Reference Fixed-Size Memorypool Status
116 */
117
118ER ref_mpf(
119  T_RMPF *pk_rmpf,
120  ID mpfid
121);
122
123#ifdef __cplusplus
124}
125#endif
126
127#endif
128/* end of include file */
Note: See TracBrowser for help on using the repository browser.