aboutsummaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-10-04 13:27:27 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-10-04 13:27:27 +0000
commitdd96bdcd511d158d80d2ef64b47c46fcb8219d5a (patch)
tree396b376976d5dbe5caf2aec4721c2db625acd0a1 /demos
parentcbf137ed955b30d8695d881aa8d16f1a723b89b5 (diff)
downloadChibiOS-dd96bdcd511d158d80d2ef64b47c46fcb8219d5a.tar.gz
ChibiOS-dd96bdcd511d158d80d2ef64b47c46fcb8219d5a.tar.bz2
ChibiOS-dd96bdcd511d158d80d2ef64b47c46fcb8219d5a.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1204 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos')
-rw-r--r--demos/ARM7-AT91SAM7X-LWIP-GCC/lwip/arch/sys_arch.c2
-rw-r--r--demos/ARM7-AT91SAM7X-LWIP-GCC/lwip/arch/sys_arch.h4
-rw-r--r--demos/ARM7-AT91SAM7X-LWIP-GCC/lwip/lwipthread.c4
-rw-r--r--demos/ARM7-AT91SAM7X-LWIP-GCC/lwipopts.h22
4 files changed, 14 insertions, 18 deletions
diff --git a/demos/ARM7-AT91SAM7X-LWIP-GCC/lwip/arch/sys_arch.c b/demos/ARM7-AT91SAM7X-LWIP-GCC/lwip/arch/sys_arch.c
index 329e0f8de..7d39c9520 100644
--- a/demos/ARM7-AT91SAM7X-LWIP-GCC/lwip/arch/sys_arch.c
+++ b/demos/ARM7-AT91SAM7X-LWIP-GCC/lwip/arch/sys_arch.c
@@ -98,7 +98,7 @@ sys_mbox_t sys_mbox_new(int size) {
sys_mbox_t mbox;
mbox = chHeapAlloc(sizeof(Mailbox) + sizeof(msg_t) * size);
- chMBInit(mbox, (void *)(mbox + 1), size);
+ chMBInit(mbox, (void *)(((uint8_t *)mbox) + sizeof(Mailbox)), size);
return mbox;
}
diff --git a/demos/ARM7-AT91SAM7X-LWIP-GCC/lwip/arch/sys_arch.h b/demos/ARM7-AT91SAM7X-LWIP-GCC/lwip/arch/sys_arch.h
index 2b503154c..a054ae761 100644
--- a/demos/ARM7-AT91SAM7X-LWIP-GCC/lwip/arch/sys_arch.h
+++ b/demos/ARM7-AT91SAM7X-LWIP-GCC/lwip/arch/sys_arch.h
@@ -57,11 +57,11 @@
#define __SYS_ARCH_H__
typedef Semaphore * sys_sem_t;
-typedef void * sys_mbox_t;
+typedef Mailbox * sys_mbox_t;
typedef Thread * sys_thread_t;
typedef int sys_prot_t;
-#define SYS_MBOX_NULL (void *)0
+#define SYS_MBOX_NULL (Mailbox *)0
#define SYS_THREAD_NULL (Thread *)0
#define SYS_SEM_NULL (Semaphore *)0
diff --git a/demos/ARM7-AT91SAM7X-LWIP-GCC/lwip/lwipthread.c b/demos/ARM7-AT91SAM7X-LWIP-GCC/lwip/lwipthread.c
index 7b9d483c4..16957811e 100644
--- a/demos/ARM7-AT91SAM7X-LWIP-GCC/lwip/lwipthread.c
+++ b/demos/ARM7-AT91SAM7X-LWIP-GCC/lwip/lwipthread.c
@@ -274,13 +274,9 @@ msg_t lwip_thread(void *p) {
/* full packet send to tcpip_thread to process */
if (thisif.input(p, &thisif) != ERR_OK) {
LWIP_DEBUGF(NETIF_DEBUG, ("ethernetif_input: IP input error\n"));
- pbuf_free(p);
- p = NULL;
}
- break;
default:
pbuf_free(p);
- break;
}
}
}
diff --git a/demos/ARM7-AT91SAM7X-LWIP-GCC/lwipopts.h b/demos/ARM7-AT91SAM7X-LWIP-GCC/lwipopts.h
index 318ee6579..ddb3aac11 100644
--- a/demos/ARM7-AT91SAM7X-LWIP-GCC/lwipopts.h
+++ b/demos/ARM7-AT91SAM7X-LWIP-GCC/lwipopts.h
@@ -1019,7 +1019,7 @@
* sys_mbox_new() when tcpip_init is called.
*/
#ifndef TCPIP_MBOX_SIZE
-#define TCPIP_MBOX_SIZE 0
+#define TCPIP_MBOX_SIZE 4
#endif
/**
@@ -1035,7 +1035,7 @@
* sys_thread_new() when the thread is created.
*/
#ifndef SLIPIF_THREAD_STACKSIZE
-#define SLIPIF_THREAD_STACKSIZE 0
+#define SLIPIF_THREAD_STACKSIZE 512
#endif
/**
@@ -1044,7 +1044,7 @@
* sys_thread_new() when the thread is created.
*/
#ifndef SLIPIF_THREAD_PRIO
-#define SLIPIF_THREAD_PRIO 1
+#define SLIPIF_THREAD_PRIO (LOWPRIO + 1)
#endif
/**
@@ -1060,7 +1060,7 @@
* sys_thread_new() when the thread is created.
*/
#ifndef PPP_THREAD_STACKSIZE
-#define PPP_THREAD_STACKSIZE 0
+#define PPP_THREAD_STACKSIZE 512
#endif
/**
@@ -1069,7 +1069,7 @@
* sys_thread_new() when the thread is created.
*/
#ifndef PPP_THREAD_PRIO
-#define PPP_THREAD_PRIO 1
+#define PPP_THREAD_PRIO (LOWPRIO + 1)
#endif
/**
@@ -1085,7 +1085,7 @@
* sys_thread_new() when the thread is created.
*/
#ifndef DEFAULT_THREAD_STACKSIZE
-#define DEFAULT_THREAD_STACKSIZE 0
+#define DEFAULT_THREAD_STACKSIZE 512
#endif
/**
@@ -1094,7 +1094,7 @@
* sys_thread_new() when the thread is created.
*/
#ifndef DEFAULT_THREAD_PRIO
-#define DEFAULT_THREAD_PRIO 1
+#define DEFAULT_THREAD_PRIO (LOWPRIO + 1)
#endif
/**
@@ -1103,7 +1103,7 @@
* to sys_mbox_new() when the recvmbox is created.
*/
#ifndef DEFAULT_RAW_RECVMBOX_SIZE
-#define DEFAULT_RAW_RECVMBOX_SIZE 0
+#define DEFAULT_RAW_RECVMBOX_SIZE 4
#endif
/**
@@ -1112,7 +1112,7 @@
* to sys_mbox_new() when the recvmbox is created.
*/
#ifndef DEFAULT_UDP_RECVMBOX_SIZE
-#define DEFAULT_UDP_RECVMBOX_SIZE 0
+#define DEFAULT_UDP_RECVMBOX_SIZE 4
#endif
/**
@@ -1121,7 +1121,7 @@
* to sys_mbox_new() when the recvmbox is created.
*/
#ifndef DEFAULT_TCP_RECVMBOX_SIZE
-#define DEFAULT_TCP_RECVMBOX_SIZE 0
+#define DEFAULT_TCP_RECVMBOX_SIZE 40
#endif
/**
@@ -1130,7 +1130,7 @@
* sys_mbox_new() when the acceptmbox is created.
*/
#ifndef DEFAULT_ACCEPTMBOX_SIZE
-#define DEFAULT_ACCEPTMBOX_SIZE 0
+#define DEFAULT_ACCEPTMBOX_SIZE 4
#endif
/*