OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [itron/] [include/] [itronsys/] [fmempool.h] - Blame information for rev 389

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*
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: fmempool.h,v 1.2 2001-09-27 11:59:12 chris Exp $
10
 */
11
 
12
#ifndef __ITRON_FIXED_MEMORYPOOL_h_
13
#define __ITRON_FIXED_MEMORYPOOL_h_
14
 
15
#ifdef __cplusplus
16
extern "C" {
17
#endif
18
 
19
/*
20
 *  Create Fixed Memory Pool (cre_mpf) Structure
21
 */
22
 
23
    /* cre_mpf */
24
typedef 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 */
45
typedef 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
 
60
ER cre_mpf(
61
  ID mpfid,
62
  T_CMPF *pk_cmpf
63
);
64
 
65
/*
66
 *  del_mpf - Delete Fixed-Size Memorypool
67
 */
68
 
69
ER del_mpf(
70
  ID mpfid
71
);
72
 
73
/*
74
 *  get_blf - Get Fixed-Size Memory Block
75
 */
76
 
77
ER get_blf(
78
  VP *p_blf,
79
  ID mpfid
80
);
81
 
82
/*
83
 *  pget_blf - Poll and Get Fixed-Size Memory Block
84
 */
85
 
86
ER pget_blf(
87
  VP *p_blf,
88
  ID mpfid
89
);
90
 
91
/*
92
 *  tget_blf - Get Fixed-Size Memory Block with Timeout
93
 */
94
 
95
ER 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
 
105
ER rel_blf(
106
  ID mpfid,
107
  VP blf
108
);
109
 
110
/*
111
 *  ref_mpf - Reference Fixed-Size Memorypool Status
112
 */
113
 
114
ER 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
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.