mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-02-19 03:39:54 +00:00
sys_msleep and sys_jiffies used by PPP code.From Marc
This commit is contained in:
parent
39a6db4097
commit
2bfd55fd69
@ -278,6 +278,16 @@ sys_sem_wait_timeout(sys_sem_t sem, u32_t timeout)
|
||||
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
void
|
||||
sys_msleep(u32_t ms)
|
||||
{
|
||||
sys_sem_t delaysem = sys_sem_new(0);
|
||||
|
||||
sys_sem_wait_timeout(delaysem, ms);
|
||||
|
||||
sys_sem_free(delaysem);
|
||||
}
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
|
||||
#endif /* NO_SYS */
|
||||
|
@ -103,6 +103,14 @@ void sys_sem_free(sys_sem_t sem);
|
||||
void sys_sem_wait(sys_sem_t sem);
|
||||
int sys_sem_wait_timeout(sys_sem_t sem, u32_t timeout);
|
||||
|
||||
/* Time functions. */
|
||||
#ifndef sys_msleep
|
||||
void sys_msleep(u32_t ms); /* only has a (close to) 1 jiffy resolution. */
|
||||
#endif
|
||||
#ifndef sys_jiffies
|
||||
u32_t sys_jiffies(void); /* since power up. */
|
||||
#endif
|
||||
|
||||
/* Mailbox functions. */
|
||||
sys_mbox_t sys_mbox_new(void);
|
||||
void sys_mbox_post(sys_mbox_t mbox, void *msg);
|
||||
|
Loading…
x
Reference in New Issue
Block a user