Access to the memory pools should be exclusive between userspace and kernel. That is the reason why sys_malloc_hdlr et co. may sleep on the mlock mutex.
Some socket calls imply memory allocation from within picotcp (i.e. as a result of calling pico_socket_* functions), so they need to have a similar mechanism to be able to sleep when the allocator is busy.
This patch fix some well-known problems with socket communication.
Access to the memory pools should be exclusive between userspace and kernel. That is the reason why
sys_malloc_hdlr
et co. may sleep on themlock
mutex.Some socket calls imply memory allocation from within picotcp (i.e. as a result of calling
pico_socket_*
functions), so they need to have a similar mechanism to be able to sleep when the allocator is busy.This patch fix some well-known problems with socket communication.