feat(lwip): Add to prevent switch to tcpip thread between mbox post and sem wait

This commit is contained in:
Chen Wen
2018-11-09 17:42:53 +08:00
parent ccca5d8ceb
commit ee32bdc336
3 changed files with 37 additions and 0 deletions

View File

@ -438,6 +438,16 @@ sys_arch_msleep(int ms)
vTaskDelay(ms / portTICK_RATE_MS);
}
u8_t sys_thread_priority_get(sys_thread_t thread_handle)
{
return (u8_t)uxTaskPriorityGet(thread_handle);
}
void sys_thread_priority_set(sys_thread_t thread_handle, u8_t priority)
{
vTaskPrioritySet(thread_handle, (UBaseType_t)priority);
}
#if LWIP_NETCONN_SEM_PER_THREAD
static void sys_thread_sem_free(int index, void *data) // destructor for TLS semaphore