Date: Sat, 9 Sep 2000 20:31:54 +0200 From: "Ralf S. Engelschall" <rse@engelschall.com> To: freebsd-hackers@freebsd.org Subject: Re: makecontext & friends ? Message-ID: <20000909203154.A42704@engelschall.com>
next in thread | raw e-mail | index | archive | help
In article <20000909145118.A25823@lamu.hermes.si> you wrote: >> Sure, it can. See my GNU Portable Threads under >> http://www.gnu.org/software/pth/. We have a port under devel/pth, >> too. It bases its user-land threads on ucontext(3) if available or on >> setjmp(3)'s jmp_buf, etc. All without any assembler things. For details >> read my USENIX paper under http://www.gnu.org/software/pth/rse-pmt.ps. >> > I read your paper and it describes the very same technique I was planning > to implement, but the trick with sigaltstack() seems very ugly to me. > [...] Keep in mind that GNU Pth's Autoconf mechanism automatically selects ucontext(3) if available and only uses the sigaltstack(2) trick if no other possibilities exist. As the paper describes in detail, the "ugly trick" is just a _fallback_ approach. That's one reason why I want makecontext(3) on FreeBSD - that we no longer have to use the (15x slower) trick on FreeBSD and instead can directly use a (faster) user-land context mechanism for thread creation and dispatching (although for dispatching the sigjmp_buf approach is usually slightly faster than ucontext because ucontext is a superset of sigjmp_buf). Yours, Ralf S. Engelschall rse@engelschall.com www.engelschall.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000909203154.A42704>