2026-02-19 19:13:44 +00:00
|
|
|
#ifndef KERNEL_MSG_H_
|
|
|
|
|
#define KERNEL_MSG_H_
|
|
|
|
|
|
|
|
|
|
#include <kernel/btree.h>
|
|
|
|
|
#include <kernel/locks.h>
|
|
|
|
|
#include <mango/status.h>
|
|
|
|
|
#include <mango/types.h>
|
|
|
|
|
|
|
|
|
|
struct port;
|
|
|
|
|
struct thread;
|
|
|
|
|
|
|
|
|
|
enum kmsg_status {
|
|
|
|
|
KMSG_WAIT_RECEIVE,
|
|
|
|
|
KMSG_WAIT_REPLY,
|
|
|
|
|
KMSG_REPLY_SENT,
|
|
|
|
|
};
|
|
|
|
|
|
2026-02-26 20:50:34 +00:00
|
|
|
struct msg {
|
2026-02-19 19:13:44 +00:00
|
|
|
spin_lock_t msg_lock;
|
|
|
|
|
enum kmsg_status msg_status;
|
|
|
|
|
struct btree_node msg_node;
|
|
|
|
|
msgid_t msg_id;
|
|
|
|
|
kern_status_t msg_result;
|
|
|
|
|
struct port *msg_sender_port;
|
|
|
|
|
struct thread *msg_sender_thread;
|
2026-02-26 20:50:34 +00:00
|
|
|
const struct iovec *msg_req_data;
|
|
|
|
|
size_t msg_req_data_count;
|
|
|
|
|
struct iovec *msg_resp_data;
|
|
|
|
|
size_t msg_resp_data_count;
|
2026-02-19 19:13:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|