pppos needs support for sys_jiffies which is not included in the current sys_arch.c. Below is an example implementation.
Also when lwip exits its pppThread the way both sys_arch.c and ppp.c in lwip are written the threads resources stick around when pppClose is called. See http://lists.gnu.org/archive/html/lwip- ... 00124.html.
Perhaps we could implement a fix by patching lwip as suggested in the thread.
Code: Select all
u32_t sys_jiffies(void) {
static u32_t jiffies = 0;
#if OSAL_ST_FREQUENCY == 1000
jiffies += (u32_t)osalOsGetSystemTimeX();
#elif (OSAL_ST_FREQUENCY / 1000) >= 1 && (OSAL_ST_FREQUENCY % 1000) == 0
jiffies += ((u32_t)osalOsGetSystemTimeX() - 1) / (OSAL_ST_FREQUENCY / 1000) + 1;
#elif (1000 / OSAL_ST_FREQUENCY) >= 1 && (1000 % OSAL_ST_FREQUENCY) == 0
jiffies += ((u32_t)osalOsGetSystemTimeX() - 1) * (1000 / OSAL_ST_FREQUENCY) + 1;
#else
jiffies += (u32_t)(((u64_t)(osalOsGetSystemTimeX() - 1) * 1000) / OSAL_ST_FREQUENCY) + 1;
#endif
return jiffies;
}