kernel: remove SEND_BLOCKED and REPLY_BLOCKED statuses from ports
this allows a port to be used by multiple threads at the same time
This commit is contained in:
@@ -9,12 +9,6 @@ enum port_status {
|
|||||||
PORT_OFFLINE = 0,
|
PORT_OFFLINE = 0,
|
||||||
/* port is connected and ready to send messages */
|
/* port is connected and ready to send messages */
|
||||||
PORT_READY,
|
PORT_READY,
|
||||||
/* port has sent a message, and is waiting for the remote to receive it
|
|
||||||
*/
|
|
||||||
PORT_SEND_BLOCKED,
|
|
||||||
/* port has sent a message, and the remote has received it. waiting for
|
|
||||||
* the remote to reply. */
|
|
||||||
PORT_REPLY_BLOCKED,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct port {
|
struct port {
|
||||||
|
|||||||
@@ -102,7 +102,6 @@ static struct msg *get_next_msg(
|
|||||||
switch (msg->msg_status) {
|
switch (msg->msg_status) {
|
||||||
case KMSG_WAIT_RECEIVE:
|
case KMSG_WAIT_RECEIVE:
|
||||||
msg->msg_status = KMSG_WAIT_REPLY;
|
msg->msg_status = KMSG_WAIT_REPLY;
|
||||||
msg->msg_sender_port->p_status = PORT_REPLY_BLOCKED;
|
|
||||||
channel->c_msg_waiting--;
|
channel->c_msg_waiting--;
|
||||||
return msg;
|
return msg;
|
||||||
case KMSG_ASYNC:
|
case KMSG_ASYNC:
|
||||||
|
|||||||
@@ -148,7 +148,6 @@ kern_status_t port_send_msg(
|
|||||||
|
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
channel_lock_irqsave(port->p_remote, &flags);
|
channel_lock_irqsave(port->p_remote, &flags);
|
||||||
port->p_status = PORT_SEND_BLOCKED;
|
|
||||||
channel_enqueue_msg(port->p_remote, &msg);
|
channel_enqueue_msg(port->p_remote, &msg);
|
||||||
channel_unlock_irqrestore(port->p_remote, flags);
|
channel_unlock_irqrestore(port->p_remote, flags);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user