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/msgbuffer.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 '')
-rw-r--r-- | c/src/exec/itron/include/itronsys/msgbuffer.h | 157 |
1 files changed, 157 insertions, 0 deletions
diff --git a/c/src/exec/itron/include/itronsys/msgbuffer.h b/c/src/exec/itron/include/itronsys/msgbuffer.h new file mode 100644 index 0000000000..20a7563851 --- /dev/null +++ b/c/src/exec/itron/include/itronsys/msgbuffer.h @@ -0,0 +1,157 @@ +/* + * 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_MESSAGEBUFFER_h_ +#define __ITRON_MESSAGEBUFFER_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Create Message Buffer (cre_mbf) Structure + */ + +typedef struct t_cmbf { + VP exinf; /* extended information */ + ATR mbfatr; /* messagebuffer attributes */ + INT bufsz; /* messagebuffer size */ + INT maxmsz; /* maximum size of messages */ + /* additional information may be included depending on the implementation */ +} T_CMBF; + +/* + * mbfatr + */ + +#define TA_TFIFO 0x00 /* tasks waiting to receive messages are handled + by FIFO */ +#define TA_TPRI 0x01 /* tasks waiting to receive messages are handled + by priority */ + +/* + * mbfid + */ + +#define TMBF_OS (-4) /* messagebuffer used for OS error log */ +#define TMBF_DB (-3) /* messagebuffer used for debugging */ + +/* + * Reference Message Buffer (ref_mbf) Structure + */ + +typedef struct t_rmbf { + VP exinf; /* extended information */ + BOOL_ID wtsk; /* indicates whether or not there is a */ + /* task waiting to receive a message */ + BOOL_ID stsk; /* indicates whether or not there is a */ + /* task waiting to send a message */ + INT msgsz; /* size of message to be sent next */ + INT frbufsz; /* size of free buffer */ + /* additional information may be included depending on the implementation */ +} T_RMBF; + +/* + * Message Buffer Functions + */ + +/* + * cre_mbf - Create MessageBuffer + */ + +ER cre_mbf( + ID mbfid, + T_CMBF *pk_cmbf +); + +/* + * del_mbf - Delete MessageBuffer + */ + +ER del_mbf( + ID mbfid +); + +/* + * snd_mbf - Send Message to MessageBuffer + */ + +ER snd_mbf( + ID mbfid, + VP msg, + INT msgsz +); + +/* + * psnd_mbf - Poll and Send Message to MessageBuffer + */ + +ER psnd_mbf( + ID mbfid, + VP msg, + INT msgsz +); + +/* + * tsnd_mbf - Send Message to MessageBuffer with Timeout + */ + +ER tsnd_mbf( + ID mbfid, + VP msg, + INT msgsz, + TMO tmout +); + +/* + * rcv_mbf - Receive Message from MessageBuffer + */ + +ER rcv_mbf( + VP msg, + INT *p_msgsz, + ID mbfid +); + +/* + * prcv_mbf - Poll and Receive Message from MessageBuffer + */ + +ER prcv_mbf( + VP msg, + INT *p_msgsz, + ID mbfid +); + +/* + * trcv_mbf - Receive Message from MessageBuffer with Timeout + */ + +ER trcv_mbf( + VP msg, + INT *p_msgsz, + ID mbfid, + TMO tmout +); + +/* + * ref_mbf - Reference MessageBuffer Status + */ + +ER ref_mbf( + T_RMBF *pk_rmbf, + ID mbfid +); + +#ifdef __cplusplus +} +#endif + +#endif +/* end of include file */ + |