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/] [vmempool.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: vmempool.h,v 1.2 2001-09-27 11:59:12 chris Exp $
10
 */
11
 
12
#ifndef __ITRON_VARIABLE_MEMORYPOOL_h_
13
#define __ITRON_VARIABLE_MEMORYPOOL_h_
14
 
15
#ifdef __cplusplus
16
extern "C" {
17
#endif
18
 
19
/*
20
 *  Create Variable Memory Pool (cre_mpl) Structure
21
 */
22
 
23
typedef struct t_cmpl {
24
  VP    exinf;    /* extended information */
25
  ATR   mplatr;   /* memorypool attributes */
26
  INT   mplsz;    /* memorypool size */
27
  /* additional information may be included depending on the implementation */
28
} T_CMPL;
29
 
30
/*
31
 *  mplatr
32
 */
33
 
34
#define TA_TFIFO   0x00   /* waiting tasks are handled by FIFO */
35
#define TA_TPRI    0x01   /* waiting tasks are handled by priority */
36
 
37
/*
38
 *  mplid
39
 */
40
 
41
#define TMPL_OS   (-4)   /* memorypool used by OS */
42
 
43
/*
44
 *  Reference Variable Memory Pool (ref_mpl) Structure
45
 */
46
 
47
typedef struct t_rmpl {
48
  VP        exinf;    /* extended information */
49
  BOOL_ID   wtsk;     /* indicates whether or not there are waiting tasks */
50
  INT       frsz;     /* total size of free memory */
51
  INT       maxsz;    /* size of largest contiguous memory */
52
  /* additional information may be included depending on the implementation */
53
} T_RMPL;
54
 
55
/*
56
 *  Variable Memory Pool Functions
57
 */
58
 
59
/*
60
 *  cre_mpl - Create Variable-Size Memorypool
61
 */
62
 
63
ER cre_mpl(
64
  ID mplid,
65
  T_CMPL *pk_cmpl
66
);
67
 
68
/*
69
 *  del_mpl - Delete Variable-Size Memorypool
70
 */
71
 
72
ER del_mpl(
73
  ID mplid
74
);
75
 
76
/*
77
 *  get_blk - Get Variable-Size Memory Block
78
 */
79
 
80
ER get_blk(
81
  VP *p_blk,
82
  ID mplid,
83
  INT blksz
84
);
85
 
86
/*
87
 *  pget_blk - Poll and Get Variable-Size Memory Block
88
 */
89
 
90
ER pget_blk(
91
  VP *p_blk,
92
  ID mplid,
93
  INT blksz
94
);
95
 
96
/*
97
 *  tget_blk - Get Variable-Size Memory Block with Timeout
98
 */
99
 
100
ER tget_blk(
101
  VP *p_blk,
102
  ID mplid,
103
  INT blksz,
104
  TMO tmout
105
);
106
 
107
/*
108
 *  rel_blk - Release Variable-Size Memory Block
109
 */
110
 
111
ER rel_blk(
112
  ID mplid,
113
  VP blk
114
);
115
 
116
/*
117
 *  ref_mpl - Reference Variable-Size Memorypool Status
118
 */
119
 
120
ER ref_mpl(
121
  T_RMPL *pk_rmpl,
122
  ID mplid
123
);
124
 
125
 
126
#ifdef __cplusplus
127
}
128
#endif
129
 
130
#endif
131
/* end of include file */
132
 

powered by: WebSVN 2.1.0

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