On 11-05-25 09:28 PM, Graydon Hoare wrote:
You should include the cost of getting there in the first place. A lot
more has to be implemented to get M:N working.
Sure. We have to implement ... ucontext.h. Which is already present on 2
of our main platforms and there are several free copies floating around
the net if we're having trouble implementing it on the 3rd.
Cases in point, here are some implementations of the core context-switch
function:
freebsd:
http://gitweb.dragonflybsd.org/dragonfly.git/blob/e2b7bcae8c26bcb8da3553133980725affac44c3:/lib/libc/x86_64/gen/mcontext.S
glibc:
http://repo.or.cz/w/glibc.git/blob/ea486f691d34ef2a28d06bb507ac3352e32e1f13:/sysdeps/unix/sysv/linux/i386/setcontext.S
it's just not a massive undertaking, writing that function. You can even
elide the signal stuff for us since we're not storing per-task signal masks.
-Graydon
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev