优化ipc结构,非常精简
This commit is contained in:
@@ -54,12 +54,12 @@ typedef struct sp_info
|
||||
|
||||
typedef struct msg_buf
|
||||
{
|
||||
void *msg; //!< buf,长度是固定的 @see THREAD_MSG_BUG_LEN
|
||||
thread_t *send_th; //!< 标志是谁发送的该数据
|
||||
thread_t *recv_th; //!< 标志数据的接收方是谁
|
||||
uhmword_t flags; //!< 传输标志
|
||||
uint8_t len; //!< 这里不是buf的大小,而是存储接收或者发送的长度
|
||||
uint8_t ipc_ide; //!< ipc类型
|
||||
void *msg; //!< buf,长度是固定的 @see THREAD_MSG_BUG_LEN
|
||||
uint8_t len; //!< 这里不是buf的大小,而是存储接收或者发送的长度
|
||||
// thread_t *send_th; //!< 标志是谁发送的该数据
|
||||
// thread_t *recv_th; //!< 标志数据的接收方是谁
|
||||
// uhmword_t flags; //!< 传输标志
|
||||
// uint8_t ipc_ide; //!< ipc类型
|
||||
} msg_buf_t;
|
||||
|
||||
#define THREAD_MAIGC 0xdeadead //!< 用于栈溢出检测
|
||||
@@ -81,7 +81,6 @@ static inline void thread_set_msg_bug(thread_t *th, void *msg, uint16_t len)
|
||||
{
|
||||
th->msg.msg = msg;
|
||||
th->msg.len = len;
|
||||
th->msg.flags = 0;
|
||||
}
|
||||
|
||||
static inline enum thread_state thread_get_status(thread_t *th)
|
||||
@@ -115,6 +114,7 @@ thread_t *thread_create(ram_limit_t *ram);
|
||||
void thread_bind(thread_t *th, kobject_t *tk);
|
||||
void thread_unbind(thread_t *th);
|
||||
|
||||
void thread_send_wait(thread_t *th);
|
||||
void thread_sched(void);
|
||||
void thread_suspend(thread_t *th);
|
||||
void thread_ready(thread_t *th, bool_t is_sche);
|
||||
Reference in New Issue
Block a user