source: rtems/cpukit/itron/include/itronsys/fmempool.h @ 9d9a3dd

4.104.114.84.95
Last change on this file since 9d9a3dd was 9d9a3dd, checked in by Jennifer Averett <Jennifer.Averett@…>, on 11/17/99 at 16:47:58

+ Updated copyright information.

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