From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9279 Path: news.gmane.org!not-for-mail From: u-uy74@aetey.se Newsgroups: gmane.linux.lib.musl.general Subject: Re: setcontext/getcontext/makecontext missing? Date: Sun, 7 Feb 2016 11:05:53 +0100 Message-ID: <20160207100553.GJ25193@example.net> References: <87199830-7260-4E33-B3A6-BE15AF610BCE@akamai.com> <20160204145409.GB9915@port70.net> <20160204154137.GN9349@brightrain.aerifal.cx> <20160204162246.GF25193@example.net> <20160204192403.GR9349@brightrain.aerifal.cx> <20160205095835.GH25193@example.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1454839585 25796 80.91.229.3 (7 Feb 2016 10:06:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 7 Feb 2016 10:06:25 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9292-gllmg-musl=m.gmane.org@lists.openwall.com Sun Feb 07 11:06:25 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1aSMEa-00020h-MY for gllmg-musl@m.gmane.org; Sun, 07 Feb 2016 11:06:24 +0100 Original-Received: (qmail 7367 invoked by uid 550); 7 Feb 2016 10:06:20 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 7346 invoked from network); 7 Feb 2016 10:06:19 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fripost.org; h= in-reply-to:content-disposition:content-type:content-type :mime-version:references:message-id:subject:subject:from:from :date:date; s=20140703; t=1454839567; x=1456653968; bh=0e7oWnDk4 oOmx22Mq4fCoJ7D1UPIz36aJfO1o8fdri4=; b=a8Eyohikf0Y78fRp7E5ZSEcsn ShA/OCCPEUaXzmM+TAtxI6zTwi/WRgiDUecPpqKEhp4ebl4ug4cgnJyNT1Iust/j gX3y/hBaaYoU3FwjiplNxbYptTTE/hEzAlX+Qa7YLUKhn7CZiAlR8GR7x2v8O/+N 4sE5FtmwgupWP862Q0= X-Virus-Scanned: Debian amavisd-new at fripost.org Content-Disposition: inline In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:9279 Archived-At: On Sat, Feb 06, 2016 at 09:20:49PM -0800, Justin Cormack wrote: > > Thanks for pointing this out, if rt_sigprocmask can not be skipped > > then indeed a switch becomes much more expensive. > > Many users of this interface do not actually require this. Actually NetBSD > makes the context functions syscalls themselves. And OpenBSD does not > provide them at all. > > I have taken to just including implementations (without the signal calls) > in code that needs to use them That's what Coda does. This creates the burden to add the assembler code for new architectures when necessary - or an option to resort to one of the heavier alternatives. > with modifications to fix the prototype > issues as most code only needs to pass a single argument. At one point I > was going to do implementations for Musl but I think it is a bad idea. I have to agree. Providing a non-compliant implementation in musl would undermine its spirit (of standard-compliance). OTOH a tiny standalone library with the adjusted API and without the signal stuff *might* be actually a good fit for some applications, especially for the old ones written to ucontext. Rune