mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-30 14:42:34 +08:00
fix compiling unit tests after adding compile-time check for LWIP_NETCONN_FULLDUPLEX
This commit is contained in:
@@ -365,7 +365,23 @@ sys_arch_mbox_tryfetch(sys_mbox_t *q, void **msg)
|
||||
}
|
||||
|
||||
#if LWIP_NETCONN_SEM_PER_THREAD
|
||||
#error LWIP_NETCONN_SEM_PER_THREAD==1 not supported
|
||||
/* Simple implementation of this: unit tests only support one thread */
|
||||
static sys_sem_t global_netconn_sem;
|
||||
|
||||
sys_sem_t* sys_arch_netconn_sem_get(void)
|
||||
{
|
||||
return &global_netconn_sem;
|
||||
}
|
||||
|
||||
void sys_arch_netconn_sem_alloc(void)
|
||||
{
|
||||
sys_sem_new(&global_netconn_sem, 0);
|
||||
}
|
||||
|
||||
void sys_arch_netconn_sem_free(void)
|
||||
{
|
||||
sys_sem_free(&global_netconn_sem);
|
||||
}
|
||||
#endif /* LWIP_NETCONN_SEM_PER_THREAD */
|
||||
|
||||
#endif /* !NO_SYS */
|
||||
|
||||
Reference in New Issue
Block a user