diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-11-09 22:07:23 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-11-09 22:07:23 +0000 |
commit | 352c9b2035e32e56f10f261d94955d97f4ab0f1c (patch) | |
tree | f433e95ae0ab8d8854ea19b7f4bfab3ffb431726 /c/src/exec/itron/include/itronsys/fmempool.h | |
parent | Fixed warning where initialized default POSIX API structure did (diff) | |
download | rtems-352c9b2035e32e56f10f261d94955d97f4ab0f1c.tar.bz2 |
This patch adds the basic framework for the ITRON 3.0 API implementation
for RTEMS.
Diffstat (limited to 'c/src/exec/itron/include/itronsys/fmempool.h')
-rw-r--r-- | c/src/exec/itron/include/itronsys/fmempool.h | 122 |
1 files changed, 122 insertions, 0 deletions
diff --git a/c/src/exec/itron/include/itronsys/fmempool.h b/c/src/exec/itron/include/itronsys/fmempool.h new file mode 100644 index 0000000000..fa72c8eb31 --- /dev/null +++ b/c/src/exec/itron/include/itronsys/fmempool.h @@ -0,0 +1,122 @@ +/* + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.OARcorp.com/rtems/license.html. + * + * $Id$ + */ + +#ifndef __ITRON_FIXED_MEMORYPOOL_h_ +#define __ITRON_FIXED_MEMORYPOOL_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Create Fixed Memory Pool (cre_mpf) Structure + */ + + /* cre_mpf */ +typedef struct t_cmpf { + VP exinf; /* extended information */ + ATR mpfatr; /* memorypool attributes */ + INT mpfcnt; /* block count for entire memorypool */ + INT blfsz; /* fixed-size memory block size */ + /* additional information may be included depending on the implementation */ +} T_CMPF; + +/* + * mpfatr + */ + +#define TA_TFIFO 0x00 /* waiting tasks are handled by FIFO */ +#define TA_TPRI 0x01 /* waiting tasks are handled by priority */ + + +/* + * Reference Fixed Memory Pool (ref_mpf) Structure + */ + + /* ref_mpf */ +typedef struct t_rmpf { + VP exinf; /* extended information */ + BOOL_ID wtsk; /* indicates whether or not there are waiting tasks */ + INT frbcnt; /* free block count */ + /* additional information may be included depending on the implementation */ +} T_RMPF; + +/* + * Fixed Memory Pool Functions + */ + +/* + * cre_mpf - Create Fixed-Size Memorypool + */ + +ER cre_mpf( + ID mpfid, + T_CMPF *pk_cmpf +); + +/* + * del_mpf - Delete Fixed-Size Memorypool + */ + +ER del_mpf( + ID mpfid +); + +/* + * get_blf - Get Fixed-Size Memory Block + */ + +ER get_blf( + VP *p_blf, + ID mpfid +); + +/* + * pget_blf - Poll and Get Fixed-Size Memory Block + */ + +ER pget_blf( + VP *p_blf, + ID mpfid +); + +/* + * tget_blf - Get Fixed-Size Memory Block with Timeout + */ + +ER tget_blf( + VP *p_blf, + ID mpfid, + TMO tmout +); + +/* + * rel_blf - Release Fixed-Size Memory Block + */ + +ER rel_blf( + ID mpfid, + VP blf +); + +/* + * ref_mpf - Reference Fixed-Size Memorypool Status + */ + +ER ref_mpf( + T_RMPF *pk_rmpf, + ID mpfid +); + +#ifdef __cplusplus +} +#endif + +#endif +/* end of include file */ + |