mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-03 21:14:40 +08:00
Corrected do_write for LWIP_TCPIP_CORE_LOCKING=1
This commit is contained in:
parent
2aef8bad55
commit
67795ad26e
@ -729,7 +729,7 @@ do_writemore(struct netconn *conn)
|
|||||||
u16_t len, available;
|
u16_t len, available;
|
||||||
u8_t write_finished = 0;
|
u8_t write_finished = 0;
|
||||||
|
|
||||||
LWIP_ASSERT("conn->state != NETCONN_WRITE", (conn->state != NETCONN_WRITE));
|
LWIP_ASSERT("conn->state == NETCONN_WRITE", (conn->state == NETCONN_WRITE));
|
||||||
|
|
||||||
dataptr = (u8_t*)conn->write_msg->msg.w.dataptr + conn->write_offset;
|
dataptr = (u8_t*)conn->write_msg->msg.w.dataptr + conn->write_offset;
|
||||||
len = conn->write_msg->msg.w.len - conn->write_offset;
|
len = conn->write_msg->msg.w.len - conn->write_offset;
|
||||||
@ -807,12 +807,12 @@ do_write(struct api_msg_msg *msg)
|
|||||||
msg->conn->write_offset = 0;
|
msg->conn->write_offset = 0;
|
||||||
#if LWIP_TCPIP_CORE_LOCKING
|
#if LWIP_TCPIP_CORE_LOCKING
|
||||||
msg->conn->write_delayed = 0;
|
msg->conn->write_delayed = 0;
|
||||||
while (do_writemore(msg->conn) != ERR_OK) {
|
if (do_writemore(msg->conn) != ERR_OK) {
|
||||||
LWIP_ASSERT("state!", msg->conn->state == NETCONN_WRITE);
|
LWIP_ASSERT("state!", msg->conn->state == NETCONN_WRITE);
|
||||||
UNLOCK_TCPIP_CORE();
|
UNLOCK_TCPIP_CORE();
|
||||||
sys_arch_mbox_fetch(msg->conn->mbox, NULL, 0);
|
sys_arch_mbox_fetch(msg->conn->mbox, NULL, 0);
|
||||||
LOCK_TCPIP_CORE();
|
LOCK_TCPIP_CORE();
|
||||||
LWIP_ASSERT("state!", msg->conn->state == NETCONN_WRITE);
|
LWIP_ASSERT("state!", msg->conn->state == NETCONN_NONE);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
do_writemore(msg->conn);
|
do_writemore(msg->conn);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user