mirror of https://github.com/ARMmbed/mbed-os.git
Make the sys_arch_protect() mutex be recursive.
Fixes #9744 Appears to be a lwIP porting bug. Comments in our porting layer say: This function should support recursive calls from the same task or interrupt. In other words, sys_arch_protect() could be called while already protected.pull/10861/head
parent
14b77c9a2e
commit
91402f4d77
|
@ -432,6 +432,7 @@ void sys_init(void) {
|
|||
lwip_sys_mutex_attr.name = "lwip_sys_mutex";
|
||||
lwip_sys_mutex_attr.cb_mem = &lwip_sys_mutex_data;
|
||||
lwip_sys_mutex_attr.cb_size = sizeof(lwip_sys_mutex_data);
|
||||
lwip_sys_mutex_attr.attr_bits = osMutexPrioInherit | osMutexRecursive;
|
||||
lwip_sys_mutex = osMutexNew(&lwip_sys_mutex_attr);
|
||||
if (lwip_sys_mutex == NULL)
|
||||
MBED_ERROR(MBED_MAKE_ERROR(MBED_MODULE_NETWORK_STACK, MBED_ERROR_CODE_INITIALIZATION_FAILED), "sys_init error, mutex initialization failed\n");
|
||||
|
|
Loading…
Reference in New Issue