git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1204 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
cbf137ed95
commit
dd96bdcd51
|
@ -98,7 +98,7 @@ sys_mbox_t sys_mbox_new(int size) {
|
||||||
sys_mbox_t mbox;
|
sys_mbox_t mbox;
|
||||||
|
|
||||||
mbox = chHeapAlloc(sizeof(Mailbox) + sizeof(msg_t) * size);
|
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;
|
return mbox;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,11 +57,11 @@
|
||||||
#define __SYS_ARCH_H__
|
#define __SYS_ARCH_H__
|
||||||
|
|
||||||
typedef Semaphore * sys_sem_t;
|
typedef Semaphore * sys_sem_t;
|
||||||
typedef void * sys_mbox_t;
|
typedef Mailbox * sys_mbox_t;
|
||||||
typedef Thread * sys_thread_t;
|
typedef Thread * sys_thread_t;
|
||||||
typedef int sys_prot_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_THREAD_NULL (Thread *)0
|
||||||
#define SYS_SEM_NULL (Semaphore *)0
|
#define SYS_SEM_NULL (Semaphore *)0
|
||||||
|
|
||||||
|
|
|
@ -274,13 +274,9 @@ msg_t lwip_thread(void *p) {
|
||||||
/* full packet send to tcpip_thread to process */
|
/* full packet send to tcpip_thread to process */
|
||||||
if (thisif.input(p, &thisif) != ERR_OK) {
|
if (thisif.input(p, &thisif) != ERR_OK) {
|
||||||
LWIP_DEBUGF(NETIF_DEBUG, ("ethernetif_input: IP input error\n"));
|
LWIP_DEBUGF(NETIF_DEBUG, ("ethernetif_input: IP input error\n"));
|
||||||
pbuf_free(p);
|
|
||||||
p = NULL;
|
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
pbuf_free(p);
|
pbuf_free(p);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1019,7 +1019,7 @@
|
||||||
* sys_mbox_new() when tcpip_init is called.
|
* sys_mbox_new() when tcpip_init is called.
|
||||||
*/
|
*/
|
||||||
#ifndef TCPIP_MBOX_SIZE
|
#ifndef TCPIP_MBOX_SIZE
|
||||||
#define TCPIP_MBOX_SIZE 0
|
#define TCPIP_MBOX_SIZE 4
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1035,7 +1035,7 @@
|
||||||
* sys_thread_new() when the thread is created.
|
* sys_thread_new() when the thread is created.
|
||||||
*/
|
*/
|
||||||
#ifndef SLIPIF_THREAD_STACKSIZE
|
#ifndef SLIPIF_THREAD_STACKSIZE
|
||||||
#define SLIPIF_THREAD_STACKSIZE 0
|
#define SLIPIF_THREAD_STACKSIZE 512
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1044,7 +1044,7 @@
|
||||||
* sys_thread_new() when the thread is created.
|
* sys_thread_new() when the thread is created.
|
||||||
*/
|
*/
|
||||||
#ifndef SLIPIF_THREAD_PRIO
|
#ifndef SLIPIF_THREAD_PRIO
|
||||||
#define SLIPIF_THREAD_PRIO 1
|
#define SLIPIF_THREAD_PRIO (LOWPRIO + 1)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1060,7 +1060,7 @@
|
||||||
* sys_thread_new() when the thread is created.
|
* sys_thread_new() when the thread is created.
|
||||||
*/
|
*/
|
||||||
#ifndef PPP_THREAD_STACKSIZE
|
#ifndef PPP_THREAD_STACKSIZE
|
||||||
#define PPP_THREAD_STACKSIZE 0
|
#define PPP_THREAD_STACKSIZE 512
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1069,7 +1069,7 @@
|
||||||
* sys_thread_new() when the thread is created.
|
* sys_thread_new() when the thread is created.
|
||||||
*/
|
*/
|
||||||
#ifndef PPP_THREAD_PRIO
|
#ifndef PPP_THREAD_PRIO
|
||||||
#define PPP_THREAD_PRIO 1
|
#define PPP_THREAD_PRIO (LOWPRIO + 1)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1085,7 +1085,7 @@
|
||||||
* sys_thread_new() when the thread is created.
|
* sys_thread_new() when the thread is created.
|
||||||
*/
|
*/
|
||||||
#ifndef DEFAULT_THREAD_STACKSIZE
|
#ifndef DEFAULT_THREAD_STACKSIZE
|
||||||
#define DEFAULT_THREAD_STACKSIZE 0
|
#define DEFAULT_THREAD_STACKSIZE 512
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1094,7 +1094,7 @@
|
||||||
* sys_thread_new() when the thread is created.
|
* sys_thread_new() when the thread is created.
|
||||||
*/
|
*/
|
||||||
#ifndef DEFAULT_THREAD_PRIO
|
#ifndef DEFAULT_THREAD_PRIO
|
||||||
#define DEFAULT_THREAD_PRIO 1
|
#define DEFAULT_THREAD_PRIO (LOWPRIO + 1)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1103,7 +1103,7 @@
|
||||||
* to sys_mbox_new() when the recvmbox is created.
|
* to sys_mbox_new() when the recvmbox is created.
|
||||||
*/
|
*/
|
||||||
#ifndef DEFAULT_RAW_RECVMBOX_SIZE
|
#ifndef DEFAULT_RAW_RECVMBOX_SIZE
|
||||||
#define DEFAULT_RAW_RECVMBOX_SIZE 0
|
#define DEFAULT_RAW_RECVMBOX_SIZE 4
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1112,7 +1112,7 @@
|
||||||
* to sys_mbox_new() when the recvmbox is created.
|
* to sys_mbox_new() when the recvmbox is created.
|
||||||
*/
|
*/
|
||||||
#ifndef DEFAULT_UDP_RECVMBOX_SIZE
|
#ifndef DEFAULT_UDP_RECVMBOX_SIZE
|
||||||
#define DEFAULT_UDP_RECVMBOX_SIZE 0
|
#define DEFAULT_UDP_RECVMBOX_SIZE 4
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1121,7 +1121,7 @@
|
||||||
* to sys_mbox_new() when the recvmbox is created.
|
* to sys_mbox_new() when the recvmbox is created.
|
||||||
*/
|
*/
|
||||||
#ifndef DEFAULT_TCP_RECVMBOX_SIZE
|
#ifndef DEFAULT_TCP_RECVMBOX_SIZE
|
||||||
#define DEFAULT_TCP_RECVMBOX_SIZE 0
|
#define DEFAULT_TCP_RECVMBOX_SIZE 40
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1130,7 +1130,7 @@
|
||||||
* sys_mbox_new() when the acceptmbox is created.
|
* sys_mbox_new() when the acceptmbox is created.
|
||||||
*/
|
*/
|
||||||
#ifndef DEFAULT_ACCEPTMBOX_SIZE
|
#ifndef DEFAULT_ACCEPTMBOX_SIZE
|
||||||
#define DEFAULT_ACCEPTMBOX_SIZE 0
|
#define DEFAULT_ACCEPTMBOX_SIZE 4
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue