source: rtems/c/src/exec/itron/include/itronsys/fmempool.h @ 352c9b2

4.104.114.84.95
Last change on this file since 352c9b2 was 352c9b2, checked in by Joel Sherrill <joel.sherrill@…>, on 11/09/99 at 22:07:23

This patch adds the basic framework for the ITRON 3.0 API implementation
for RTEMS.

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