kernel: add header files
This commit is contained in:
30
include/kernel/msg.h
Normal file
30
include/kernel/msg.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#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 kmsg {
|
||||
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;
|
||||
const struct msg *msg_req;
|
||||
struct msg *msg_resp;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user