Compare commits

..

1 Commits

Author SHA1 Message Date
Abdel-dev-tech
3a45513fe7
Merge 2c0a25ecd6 into cb511019b0 2024-02-19 20:32:58 +01:00
2 changed files with 7 additions and 16 deletions

View File

@ -68,20 +68,11 @@ sys_mutex_t lock_tcpip_core;
static void tcpip_thread_handle_msg(struct tcpip_msg *msg); static void tcpip_thread_handle_msg(struct tcpip_msg *msg);
#if !LWIP_TIMERS #if !LWIP_TIMERS
/* wait for a message with timers disabled (e.g. pass a timer-check trigger into tcpip_thread) */
/** Wait for a message with timers disabled (e.g. pass a timer-check trigger into tcpip_thread) */ #define TCPIP_MBOX_FETCH(mbox, msg) sys_mbox_fetch(mbox, msg)
static void
tcpip_mbox_fetch(sys_mbox_t* mbox, void** msg)
{
LWIP_ASSERT_CORE_LOCKED();
UNLOCK_TCPIP_CORE();
sys_mbox_fetch(mbox, msg);
LOCK_TCPIP_CORE();
}
#else /* !LWIP_TIMERS */ #else /* !LWIP_TIMERS */
/* wait for a message, timeouts are processed while waiting */
#define TCPIP_MBOX_FETCH(mbox, msg) tcpip_timeouts_mbox_fetch(mbox, msg)
/** /**
* Wait (forever) for a message to arrive in an mbox. * Wait (forever) for a message to arrive in an mbox.
* While waiting, timeouts are processed. * While waiting, timeouts are processed.
@ -90,7 +81,7 @@ tcpip_mbox_fetch(sys_mbox_t* mbox, void** msg)
* @param msg the place to store the message * @param msg the place to store the message
*/ */
static void static void
tcpip_mbox_fetch(sys_mbox_t *mbox, void **msg) tcpip_timeouts_mbox_fetch(sys_mbox_t *mbox, void **msg)
{ {
u32_t sleeptime, res; u32_t sleeptime, res;
@ -148,7 +139,7 @@ tcpip_thread(void *arg)
while (1) { /* MAIN Loop */ while (1) { /* MAIN Loop */
LWIP_TCPIP_THREAD_ALIVE(); LWIP_TCPIP_THREAD_ALIVE();
/* wait for a message, timeouts are processed while waiting */ /* wait for a message, timeouts are processed while waiting */
tcpip_mbox_fetch(&tcpip_mbox, (void **)&msg); TCPIP_MBOX_FETCH(&tcpip_mbox, (void **)&msg);
if (msg == NULL) { if (msg == NULL) {
LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: invalid message: NULL\n")); LWIP_DEBUGF(TCPIP_DEBUG, ("tcpip_thread: invalid message: NULL\n"));
LWIP_ASSERT("tcpip_thread: invalid message", 0); LWIP_ASSERT("tcpip_thread: invalid message", 0);

View File

@ -21,7 +21,7 @@ while($file = <FILES>) {
print(HEADER "HTTP/1.0 200 OK\r\n"); print(HEADER "HTTP/1.0 200 OK\r\n");
} }
print(HEADER "Server: lwIP/pre-0.6 (http://www.sics.se/~adam/lwip/)\r\n"); print(HEADER "Server: lwIP/pre-0.6 (http://www.sics.se/~adam/lwip/)\r\n");
if($file =~ /\.s?html?$/) { if($file =~ /\.html$/) {
print(HEADER "Content-type: text/html\r\n"); print(HEADER "Content-type: text/html\r\n");
} elsif($file =~ /\.gif$/) { } elsif($file =~ /\.gif$/) {
print(HEADER "Content-type: image/gif\r\n"); print(HEADER "Content-type: image/gif\r\n");