From owner-freebsd-hackers Fri Sep 8 7:16:51 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from slarti.muc.de (slarti.muc.de [193.149.48.10]) by hub.freebsd.org (Postfix) with SMTP id 4B31237B43F for ; Fri, 8 Sep 2000 07:16:41 -0700 (PDT) Received: (qmail 25205 invoked by uid 66); 8 Sep 2000 14:25:35 -0000 Received: from en by slarti with UUCP; Fri Sep 8 14:25:35 2000 -0000 Received: by en1.engelschall.com (Sendmail 8.11.0+) for freebsd-hackers@freebsd.org id e88EFgc87915; Fri, 8 Sep 2000 16:15:42 +0200 (CEST) Date: Fri, 8 Sep 2000 16:15:42 +0200 From: "Ralf S. Engelschall" To: freebsd-hackers@freebsd.org Subject: Re: makecontext & friends ? Message-ID: <20000908161542.A87619@engelschall.com> Reply-To: rse@engelschall.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Organization: Engelschall, Germany. X-Web-Homepage: http://www.engelschall.com/ X-PGP-Public-Key: https://www.engelschall.com/ho/rse/pgprse.asc X-PGP-Fingerprint: 00 C9 21 8E D1 AB 70 37 DD 67 A2 3A 0A 6F 8D A5 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article <20000908151942.A15852@lamu.hermes.si> you wrote: > are there any plans to implement makecontext() & friends > functions in FreeBSD? I don't know of any plans myself, but I would appreciate that we support this standardized ucontext(3) API in FreeBSD. The API is actually not the problem, the question is on what should this API internally be based? On an own mechanism or on an existing mechanism (jmp_buf, etc)? > Is there any other way to implement user-level threads? > (I know it can be done in assembler, but this is not > portable) 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. > Using pthreads is not an option for me, although pthreads > are implemented as userlevel threads in FreeBSD, but not > on most other Unixes. If you need maximum portability, then GNU Pth certainly is an option for you. 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