fix compiling unit tests after adding compile-time check for LWIP_NETCONN_FULLDUPLEX

This commit is contained in:
Simon Goldschmidt
2019-07-10 21:29:13 +02:00
parent aa545fbbc6
commit 2ebebe7287
3 changed files with 25 additions and 1 deletions

View File

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