44 |
}; |
}; |
45 |
|
|
46 |
|
|
47 |
/*-----------------------------------------------------------------------------------*/ |
|
48 |
void |
void |
49 |
sys_mbox_fetch(sys_mbox_t mbox, void **msg) |
sys_mbox_fetch(sys_mbox_t mbox, void **msg) |
50 |
{ |
{ |
96 |
|
|
97 |
} |
} |
98 |
} |
} |
99 |
/*-----------------------------------------------------------------------------------*/ |
|
100 |
void |
void |
101 |
sys_sem_wait(sys_sem_t sem) |
sys_sem_wait(sys_sem_t sem) |
102 |
{ |
{ |
152 |
|
|
153 |
} |
} |
154 |
} |
} |
155 |
/*-----------------------------------------------------------------------------------*/ |
|
156 |
void |
void |
157 |
sys_timeout(u32_t msecs, sys_timeout_handler h, void *arg) |
sys_timeout(u32_t msecs, sys_timeout_handler h, void *arg) |
158 |
{ |
{ |
203 |
/* Go through timeout list (for this task only) and remove the first matching entry, |
/* Go through timeout list (for this task only) and remove the first matching entry, |
204 |
even though the timeout has not triggered yet. |
even though the timeout has not triggered yet. |
205 |
*/ |
*/ |
206 |
/*-----------------------------------------------------------------------------------*/ |
|
207 |
void |
void |
208 |
sys_untimeout(sys_timeout_handler h, void *arg) |
sys_untimeout(sys_timeout_handler h, void *arg) |
209 |
{ |
{ |
238 |
|
|
239 |
|
|
240 |
|
|
241 |
/*-----------------------------------------------------------------------------------*/ |
|
242 |
static void |
static void |
243 |
sswt_handler(void *arg) |
sswt_handler(void *arg) |
244 |
{ |
{ |
252 |
/* Wait for a semaphore with timeout (specified in ms) */ |
/* Wait for a semaphore with timeout (specified in ms) */ |
253 |
/* timeout = 0: wait forever */ |
/* timeout = 0: wait forever */ |
254 |
/* Returns 0 on timeout. 1 otherwise */ |
/* Returns 0 on timeout. 1 otherwise */ |
255 |
/*-----------------------------------------------------------------------------------*/ |
|
256 |
int |
int |
257 |
sys_sem_wait_timeout(sys_sem_t sem, u32_t timeout) |
sys_sem_wait_timeout(sys_sem_t sem, u32_t timeout) |
258 |
{ |
{ |
279 |
|
|
280 |
} |
} |
281 |
|
|
282 |
/*-----------------------------------------------------------------------------------*/ |
|
283 |
void |
void |
284 |
sys_msleep(u32_t ms) |
sys_msleep(u32_t ms) |
285 |
{ |
{ |
289 |
|
|
290 |
sys_sem_free(delaysem); |
sys_sem_free(delaysem); |
291 |
} |
} |
292 |
/*-----------------------------------------------------------------------------------*/ |
|
293 |
|
|
294 |
#endif /* NO_SYS */ |
#endif /* NO_SYS */ |