59 |
|
|
60 |
#define sys_thread_new(t,a,p) |
#define sys_thread_new(t,a,p) |
61 |
|
|
|
/* We don't need protection if there is no OS */ |
|
|
#define SYS_ARCH_DECL_PROTECT(lev) |
|
|
#define SYS_ARCH_PROTECT(lev) |
|
|
#define SYS_ARCH_UNPROTECT(lev) |
|
|
|
|
62 |
#else /* NO_SYS */ |
#else /* NO_SYS */ |
63 |
|
|
64 |
#include "arch/sys_arch.h" |
#include "arch/sys_arch.h" |
110 |
void sys_mbox_free(sys_mbox_t mbox); |
void sys_mbox_free(sys_mbox_t mbox); |
111 |
void sys_mbox_fetch(sys_mbox_t mbox, void **msg); |
void sys_mbox_fetch(sys_mbox_t mbox, void **msg); |
112 |
|
|
113 |
|
|
114 |
|
/* Thread functions. */ |
115 |
|
sys_thread_t sys_thread_new(void (* thread)(void *arg), void *arg, int prio); |
116 |
|
|
117 |
|
/* The following functions are used only in Unix code, and |
118 |
|
can be omitted when porting the stack. */ |
119 |
|
/* Returns the current time in microseconds. */ |
120 |
|
unsigned long sys_now(void); |
121 |
|
|
122 |
|
#endif /* NO_SYS */ |
123 |
|
|
124 |
/* Critical Region Protection */ |
/* Critical Region Protection */ |
125 |
/* These functions must be implemented in the sys_arch.c file. |
/* These functions must be implemented in the sys_arch.c file. |
126 |
In some implementations they can provide a more light-weight protection |
In some implementations they can provide a more light-weight protection |
161 |
#define SYS_ARCH_UNPROTECT(lev) sys_arch_unprotect(lev) |
#define SYS_ARCH_UNPROTECT(lev) sys_arch_unprotect(lev) |
162 |
sys_prot_t sys_arch_protect(void); |
sys_prot_t sys_arch_protect(void); |
163 |
void sys_arch_unprotect(sys_prot_t pval); |
void sys_arch_unprotect(sys_prot_t pval); |
|
#endif /* SYS_LIGHTWEIGHT_PROT */ |
|
164 |
|
|
165 |
#endif /* SYS_ARCH_PROTECT */ |
#else |
166 |
|
|
167 |
/* Thread functions. */ |
#define SYS_ARCH_DECL_PROTECT(lev) |
168 |
sys_thread_t sys_thread_new(void (* thread)(void *arg), void *arg, int prio); |
#define SYS_ARCH_PROTECT(lev) |
169 |
|
#define SYS_ARCH_UNPROTECT(lev) |
170 |
|
|
171 |
/* The following functions are used only in Unix code, and |
#endif /* SYS_LIGHTWEIGHT_PROT */ |
|
can be omitted when porting the stack. */ |
|
|
/* Returns the current time in microseconds. */ |
|
|
unsigned long sys_now(void); |
|
172 |
|
|
173 |
#endif /* NO_SYS */ |
#endif /* SYS_ARCH_PROTECT */ |
174 |
|
|
175 |
#endif /* __LWIP_SYS_H__ */ |
#endif /* __LWIP_SYS_H__ */ |