vm: fix a null dereference on out-of-memory
[minix.git] / lib / liblwip / include / arch / sys_arch.h
blobf06a8b2f1a0b21896a51d07f97c57652c6756483
1 #ifndef __LWIP_SYS_ARCH_H__
2 #define __LWIP_SYS_ARCH_H__
4 #include <sys/cdefs.h>
5 #include <minix/sysutil.h>
7 #define NOT_IMPLEMENTED panic("liblwip : %s NOT_IMPLEMENTED", __func__)
9 typedef int sys_sem_t;
11 static inline err_t sys_sem_new(__unused sys_sem_t *sem, __unused u8_t count)
13 return ERR_OK;
16 static inline void sys_sem_signal(__unused sys_sem_t *sem)
20 static inline u32_t sys_arch_sem_wait(__unused sys_sem_t *sem, __unused u32_t timeout)
22 return 0;
25 static inline void sys_sem_free(__unused sys_sem_t *sem)
27 NOT_IMPLEMENTED;
30 static inline int sys_sem_valid(__unused sys_sem_t *sem)
32 NOT_IMPLEMENTED;
35 static inline void sys_sem_set_invalid(__unused sys_sem_t *sem)
37 NOT_IMPLEMENTED;
40 #define LWIP_COMPAT_MUTEX 1
42 typedef int sys_mbox_t;
44 static inline err_t sys_mbox_new(__unused sys_mbox_t *mbox, __unused int size)
46 NOT_IMPLEMENTED;
49 static inline void sys_mbox_post(__unused sys_mbox_t *mbox, __unused void *msg)
51 NOT_IMPLEMENTED;
54 static inline err_t sys_mbox_trypost(__unused sys_mbox_t *mbox, __unused void *msg)
56 NOT_IMPLEMENTED;
59 static inline u32_t sys_arch_mbox_fetch(__unused sys_mbox_t *mbox,
60 __unused void **msg,
61 __unused u32_t timeout)
63 NOT_IMPLEMENTED;
66 static inline u32_t sys_arch_mbox_tryfetch(__unused sys_mbox_t *mbox, __unused void **msg)
68 NOT_IMPLEMENTED;
71 static inline void sys_mbox_free(__unused sys_mbox_t *mbox)
73 NOT_IMPLEMENTED;
76 static inline int sys_mbox_valid(__unused sys_mbox_t *mbox)
78 NOT_IMPLEMENTED;
81 static inline void sys_mbox_set_invalid(__unused sys_mbox_t *mbox)
83 NOT_IMPLEMENTED;
86 typedef int sys_thread_t;
88 #endif /* __LWIP_SYS_ARCH_H__ */