Browse Source

unix port: fix compiling NO_SYS

Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
master
Simon Goldschmidt 8 years ago
parent
commit
e4d16330a1
  1. 2
      ports/unix/port/include/arch/cc.h
  2. 2
      ports/unix/port/include/arch/sys_arch.h
  3. 14
      ports/unix/port/sys_arch.c

2
ports/unix/port/include/arch/cc.h

@ -75,4 +75,6 @@ typedef struct sio_status_s sio_status_t;
#define sio_fd_t sio_status_t*
#define __sio_fd_t_defined
typedef unsigned int sys_prot_t;
#endif /* LWIP_ARCH_CC_H */

2
ports/unix/port/include/arch/sys_arch.h

@ -35,7 +35,7 @@
#define SYS_MBOX_NULL NULL
#define SYS_SEM_NULL NULL
typedef u32_t sys_prot_t;
/*typedef u32_t sys_prot_t;*/
struct sys_sem;
typedef struct sys_sem * sys_sem_t;

14
ports/unix/port/sys_arch.c

@ -84,6 +84,12 @@ get_monotonic_time(struct timespec *ts)
#endif
}
#if SYS_LIGHTWEIGHT_PROT
static pthread_mutex_t lwprot_mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_t lwprot_thread = (pthread_t)0xDEAD;
static int lwprot_count = 0;
#endif /* SYS_LIGHTWEIGHT_PROT */
#if !NO_SYS
static struct sys_thread *threads = NULL;
@ -121,12 +127,6 @@ struct sys_thread {
pthread_t pthread;
};
#if SYS_LIGHTWEIGHT_PROT
static pthread_mutex_t lwprot_mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_t lwprot_thread = (pthread_t)0xDEAD;
static int lwprot_count = 0;
#endif /* SYS_LIGHTWEIGHT_PROT */
static struct sys_sem *sys_sem_new_internal(u8_t count);
static void sys_sem_free_internal(struct sys_sem *sem);
@ -181,7 +181,6 @@ sys_thread_new(const char *name, lwip_thread_fn function, void *arg, int stacksi
return st;
}
#if !NO_SYS
#if LWIP_TCPIP_CORE_LOCKING
static pthread_t lwip_core_lock_holder_thread_id;
void sys_lock_tcpip_core(void)
@ -217,7 +216,6 @@ void sys_check_core_locking(void)
#endif /* LWIP_TCPIP_CORE_LOCKING */
}
}
#endif /* !NO_SYS */
/*-----------------------------------------------------------------------------------*/
/* Mailbox */

Loading…
Cancel
Save