From f5f31f5eaa35dddf9f88920d66c66668d06dbaf1 Mon Sep 17 00:00:00 2001 From: davidhaas Date: Tue, 4 Feb 2003 14:50:45 +0000 Subject: [PATCH] ---------------------------------------------------------------------- Fixed the following bugs: 2366: For coldfire port: pbuf is freed twice when no room on output ring. 2368: Coldfire port: buffer cleanup in 5272 driver causes problems. 2376: Can't have timeouts large enough Note that timeouts are now 32 bits. This was done for select() support. Coldfire and unix ports have been updated. Committing in . Modified Files: src/core/sys.c src/include/lwip/sys.h ---------------------------------------------------------------------- --- src/core/sys.c | 6 +++--- src/include/lwip/sys.h | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/core/sys.c b/src/core/sys.c index 76e009da..7af0fb06 100644 --- a/src/core/sys.c +++ b/src/core/sys.c @@ -42,7 +42,7 @@ void sys_mbox_fetch(sys_mbox_t mbox, void **msg) { - u16_t time; + u32_t time; struct sys_timeouts *timeouts; struct sys_timeout *tmptimeout; sys_timeout_handler h; @@ -91,7 +91,7 @@ sys_mbox_fetch(sys_mbox_t mbox, void **msg) void sys_sem_wait(sys_sem_t sem) { - u16_t time; + u32_t time; struct sys_timeouts *timeouts; struct sys_timeout *tmptimeout; sys_timeout_handler h; @@ -142,7 +142,7 @@ sys_sem_wait(sys_sem_t sem) } /*-----------------------------------------------------------------------------------*/ void -sys_timeout(u16_t msecs, sys_timeout_handler h, void *arg) +sys_timeout(u32_t msecs, sys_timeout_handler h, void *arg) { struct sys_timeouts *timeouts; struct sys_timeout *timeout, *t; diff --git a/src/include/lwip/sys.h b/src/include/lwip/sys.h index 608e8011..18f47290 100644 --- a/src/include/lwip/sys.h +++ b/src/include/lwip/sys.h @@ -65,7 +65,7 @@ typedef void (* sys_timeout_handler)(void *arg); struct sys_timeout { struct sys_timeout *next; - u16_t time; + u32_t time; sys_timeout_handler h; void *arg; }; @@ -86,20 +86,20 @@ void sys_init(void); * called. * */ -void sys_timeout(u16_t msecs, sys_timeout_handler h, void *arg); +void sys_timeout(u32_t msecs, sys_timeout_handler h, void *arg); struct sys_timeouts *sys_arch_timeouts(void); /* Semaphore functions. */ sys_sem_t sys_sem_new(u8_t count); void sys_sem_signal(sys_sem_t sem); -u16_t sys_arch_sem_wait(sys_sem_t sem, u16_t timeout); +u32_t sys_arch_sem_wait(sys_sem_t sem, u32_t timeout); void sys_sem_free(sys_sem_t sem); void sys_sem_wait(sys_sem_t sem); /* Mailbox functions. */ sys_mbox_t sys_mbox_new(void); void sys_mbox_post(sys_mbox_t mbox, void *msg); -u16_t sys_arch_mbox_fetch(sys_mbox_t mbox, void **msg, u16_t timeout); +u32_t sys_arch_mbox_fetch(sys_mbox_t mbox, void **msg, u32_t timeout); void sys_mbox_free(sys_mbox_t mbox); void sys_mbox_fetch(sys_mbox_t mbox, void **msg);