⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 msg.h

📁 介绍ROCK OS操作系统.一般用于汽车电子,类似OCVX.里面是个DEMO文档,内附说明.
💻 H
字号:
/******************************************************************************
   Copyright (c) 2006 by RockOS.
   All rights reserved.

   This software is supported by the Rock Software Workroom.

   Any bugs please contact the author with e-mail or QQ:
     E-mail : baobaoba520@yahoo.com.cn
         QQ : 59681888
*******************************************************************************
File name   : msg.h
Description : header file for message packet management.
            : 
            : 
Auther      : sunxinqiu
History     :
  2006-3-15   first release.
******************************************************************************/
#ifndef __MSG_H__
#define __MSG_H__

#ifdef __cplusplus
extern "C" {
#endif

enum
{
    MINI_MSG_PACK       = 1,
    COMMON_MSG_PACK     = 2,
    HUGE_MSG_PACK       = 3
};

enum
{
    OS_MSG_FREE         = 0,
    OS_MSG_ALLOCATED    = 1,
    OS_MSG_SENT         = 2,
    OS_MSG_RECEIVED     = 3
};

/* for message packet. */
typedef struct
{
    U16 state;

    U16   times;
    HTASK owner;
    void * pBuffer;
}MSGCB;

STATUS msg_init(void);

HMSG msgAlloc(U16 type);
void * msgMap (HMSG hmsg);
STATUS msgFree (HMSG hmsg);
STATUS msgSend(HMSG hmsg, HTASK task, U32 timeout);
STATUS setmsgState(HMSG hmsg, U16 state);
void msgCheck(void);
void msgDump(HMSG hmsg);

#ifdef __cplusplus
}
#endif

#endif


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -