git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1204 35acf78f-673a-0410-8e92-d51de3d6d3f4

master
gdisirio 2009-10-04 13:27:27 +00:00
parent cbf137ed95
commit dd96bdcd51
4 changed files with 14 additions and 18 deletions

View File

@ -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;
}

View File

@ -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

View File

@ -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;
}
}
}

View File

@ -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
/*