30 lines
504 B
C
30 lines
504 B
C
#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 {
|
|
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;
|
|
};
|
|
|
|
#endif
|