diff --git a/src/sys/include/net/arch/cc.h b/src/sys/include/net/arch/cc.h index bb4d2ce..01dfe86 100644 --- a/src/sys/include/net/arch/cc.h +++ b/src/sys/include/net/arch/cc.h @@ -8,4 +8,8 @@ #define PACK_STRUCT_BEGIN #define PACK_STRUCT_END +#ifdef LWIP_ERR_T +typedef uint8_t err_t; +#endif + #endif diff --git a/src/sys/include/net/lwipopts.h b/src/sys/include/net/lwipopts.h index 0abac09..76fd485 100644 --- a/src/sys/include/net/lwipopts.h +++ b/src/sys/include/net/lwipopts.h @@ -47,7 +47,7 @@ #define LWIP_MPU_COMPATIBLE 0 #define LWIP_TCPIP_CORE_LOCKING 1 #define LWIP_TCPIP_CORE_LOCKING_INPUT 0 -#define SYS_LIGHTWEIGHT_PROT 1 +#define SYS_LIGHTWEIGHT_PROT 0 #define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 0 diff --git a/src/sys/include/net/sys.h b/src/sys/include/net/sys.h index 622e6af..ada5b1e 100644 --- a/src/sys/include/net/sys.h +++ b/src/sys/include/net/sys.h @@ -41,7 +41,7 @@ #if NO_SYS -#else /* NO_SYS */ - Mr O +#else /* NO_SYS */ /** Return code for timeouts from sys_arch_mbox_fetch and sys_arch_sem_wait */ #define SYS_ARCH_TIMEOUT 0xffffffffUL diff --git a/src/sys/net/net/sys_arch.c b/src/sys/net/net/sys_arch.c index 2caa334..641f2ef 100644 --- a/src/sys/net/net/sys_arch.c +++ b/src/sys/net/net/sys_arch.c @@ -22,6 +22,8 @@ static spinLock_t netThreadSpinlock = SPIN_LOCK_INITIALIZER; static struct sys_thread *threads = 0x0; +static uint16_t cond_wait(ubthread_cond_t *cond, ubthread_mutex_t *mutex, uint16_t timeout); + /* sys_arch layer initializer */ void sys_init() { struct timezone tz; @@ -91,7 +93,7 @@ kprintf("NEED TO DO THIS"); } -err_t sys_mutex_new(sys_mutex_t *mutex) { +err_r sys_mutex_new(sys_mutex_t *mutex) { ubthread_mutex_init(&(mutex->mutex), NULL); return ERR_OK; } @@ -257,7 +259,6 @@ } /* OLD */ -static uint16_t cond_wait(ubthread_cond_t *cond, ubthread_mutex_t *mutex, uint16_t timeout); struct thread_start_param { struct sys_thread *thread;