ipc增加测试

This commit is contained in:
zhangzheng
2023-08-30 00:36:52 +08:00
parent 1733c9dd14
commit e4ea80232c
30 changed files with 731 additions and 307 deletions

View File

@@ -14,7 +14,8 @@
#include "arch.h"
#include "ref.h"
#define THREAD_BLOCK_SIZE 0x400 //!< 线程块大小,栈在块的顶部
struct thread;
typedef struct thread thread_t;
enum thread_state
{
THREAD_IDLE,
@@ -45,11 +46,13 @@ typedef struct sp_info
#define THREAD_MSG_BUG_LEN 128 //!< 默认的消息寄存器大小
#define MSG_BUF_HAS_DATA_FLAGS 0x01U //!< 已经有数据了
#define MSG_BUF_CALL_FLAGS 0x02U //!< 是CALL
typedef struct msg_buf
{
void *msg; //!< buf长度 @see THREAD_MSG_BUG_LEN
uhmword_t len; //!< 这里不是buf的大小而是存储接收或者发送的长度
uhmword_t flags; //!< 传输标志
void *msg; //!< buf长度 @see THREAD_MSG_BUG_LEN
uhmword_t len; //!< 这里不是buf的大小而是存储接收或者发送的长度
uhmword_t flags; //!< 传输标志
thread_t *call_send; //!< 当是call操作时存放call的发起方
} msg_buf_t;
#define THREAD_MAIGC 0xdeadead