115 |
such functionality is needed in lwIP, the following function will have |
such functionality is needed in lwIP, the following function will have |
116 |
to be implemented as well: |
to be implemented as well: |
117 |
|
|
118 |
- void sys_thread_new(void (* thread)(void *arg), void *arg) |
- sys_thread_t sys_thread_new(void (* thread)(void *arg), void *arg) |
119 |
|
|
120 |
Starts a new thread that will begin its execution in the function |
Starts a new thread that will begin its execution in the function |
121 |
"thread()". The "arg" argument will be passed as an argument to the |
"thread()". The "arg" argument will be passed as an argument to the |
122 |
thread() function. |
thread() function. The id of the new thread is returned. |
123 |
|
|
124 |
|
- sys_prot_t sys_arch_protect(void) |
125 |
|
|
126 |
|
This optional function does a "fast" critical region protection and returns |
127 |
|
the previous protection level. This function is only called during very short |
128 |
|
critical regions. An embedded system which supports ISR-based drivers might |
129 |
|
want to implement this function by disabling interrupts. Task-based systems |
130 |
|
might want to implement this by using a mutex or disabling tasking. This |
131 |
|
function should support recursive calls from the same task or interrupt. In |
132 |
|
other words, sys_arch_protect() could be called while already protected. In |
133 |
|
that case the return value indicates that it is already protected. |
134 |
|
|
135 |
|
sys_arch_protect() is only required if your port is supporting an operating |
136 |
|
system. |
137 |
|
|
138 |
|
- void sys_arch_unprotect(sys_prot_t pval) |
139 |
|
|
140 |
|
This optional function does a "fast" set of critical region protection to the |
141 |
|
value specified by pval. See the documentation for sys_arch_protect() for |
142 |
|
more information. This function is only required if your port is supporting |
143 |
|
an operating system. |
144 |
|
|
145 |
|
|
146 |
|
|