Files

30 lines
504 B
C
Raw Permalink Normal View History

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,
};
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;
kern_msg_t msg_req, msg_resp;
2026-02-19 19:13:44 +00:00
};
#endif