shithub: riscv

Download patch

ref: 07608c768faadfe960872d492d960be3112b7999
parent: 24bd67f990fde5f25783293f57f651c93ce19125
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Mon Oct 11 20:49:12 EDT 2021

libthread: deal with _schedfork() and _schedexec() returning -1

The current behaviour of the kernel to deadlock itself
instead of returning an error on fork.

This might change in the future, so prepare libthread
to handle this case.

For _schedfork(), we'r going to just retry forking
on every switch, while for _schedexec(), the exec
will fail and send ~0 down the pid channel.