insane-adding-machines / frosted

Frosted: Free POSIX OS for tiny embedded devices
GNU General Public License v2.0
213 stars 39 forks source link

Socket syscalls now suspends when the allocator is busy. #126

Closed danielinux closed 7 years ago

danielinux commented 7 years ago

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.