From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12425 Path: news.gmane.org!.POSTED!not-for-mail From: William Pitcock Newsgroups: gmane.linux.lib.musl.general Subject: Re: getcontext, setcontext, makecontext and swapcontext Date: Mon, 29 Jan 2018 09:38:00 -0600 Message-ID: References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1517240179 8055 195.159.176.226 (29 Jan 2018 15:36:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 29 Jan 2018 15:36:19 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-12441-gllmg-musl=m.gmane.org@lists.openwall.com Mon Jan 29 16:36:15 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1egBTg-0001fW-2y for gllmg-musl@m.gmane.org; Mon, 29 Jan 2018 16:36:12 +0100 Original-Received: (qmail 3694 invoked by uid 550); 29 Jan 2018 15:38:13 -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 3672 invoked from network); 29 Jan 2018 15:38:12 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dereferenced-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-transfer-encoding; bh=eJxpksDSF1IPDinHR9LD0tYJIFYDh1bS+l5lqCcLVKU=; b=GBnrjHNJpI9EkvFLMgWhmeOR3Iz4ekMtDyl+CBRy30V9RwsHIhyxUkEllqbkZ3LGyj XGM4EVtgB/yp/zHWXxuFNCem5EDY5Kkbw/oaF1me0j3L/Wfc7LCvj4l4/kNO+XPAcWV/ ZuyVwWupzXlk7n6UiIgjv1E7jK6HnKzpqpuEmGEiwMLqFSwrtQTch7nezy01uArMIbNl lUdnUk0nSZtS34ijP6awrI4kjj2u7Ym/51GsnhbEghT35Ei/RaQAT8zAiAB/h5w54M5x 8OWACu+XcL6ctujAIzJLbLA9qheQkTzsxeY7PAyuP54+Q0oa/KKHxKPcwLsvfgFqP6xC USuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-transfer-encoding; bh=eJxpksDSF1IPDinHR9LD0tYJIFYDh1bS+l5lqCcLVKU=; b=jpg4+b9C+zT2g1c/MvIl6MQ4SERX1skDUdKvsXPbzIDKoofUVpA6FNvIyyaQc3lAWu jFACmM4ongN8vdyQD1L+i1RLb80doGCa1Zbxpa1KuTH7hOH/dJ9Rev/LlAf9eIjSdp2U 8bEvO63YqmmPq5I14jy2xxOh14CYDIS7IxAIDYDmRDI/Hih4BX3SmThFUwIlfvg0N0Y1 bs/mRbFK59Jy/9xQBE5CWfKmVj5wJYtUx9GyQsbashnAL/f2AjKDzL+4QjFtkO8mt2bn 2I3pchtmVHSpVUuIjwmRnMyCtdlyW99LelfGofiWG5OyqTuer82MCMz1egyyFgSY5f8w +xJA== X-Gm-Message-State: AKwxytcK7qWFL2ykuX0mvrjkHdbgJYMmm3Baw9r0IOHG1z/Ww/TvZrUU F/JUeN+J/jqzOKnFIDYdJfwA/6ysZH4w7UZ1pW7irw== X-Google-Smtp-Source: AH8x22402VGNO7VIr1eiMN9eN9NrUmiZQjM4Rv/ZxQp8d1wsN7+GPiWkov27ZYgJtxEA6svZnCPlQqpoLyJB+XQ6HEU= X-Received: by 10.200.35.113 with SMTP id b46mr39009094qtb.262.1517240280564; Mon, 29 Jan 2018 07:38:00 -0800 (PST) In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:12425 Archived-At: Hi, On Sun, Jan 28, 2018 at 6:24 AM, Tmp File wrote: > Hello all. > > I'm compiling many software in a musl box and (by far) the biggest wall I= hit regards the functions getcontext, setcontext, makecontext and swapcont= ext. I understand they are deprecated, but they are used in many programs a= nd it's usually really troublesome/tricky to modify the upstream source cod= e to accomodate for them being unavailable on musl. > > David du Colombier from plan9port mentioned[0] a simple coroutine library= called libstak[1] that should help. > I see 2 possible approaches: > (i) musl imports libstak > (ii} users somehow compile libstak and make it available for programs tha= t need the *context functions > > In case you aren't interested in (i) could somebody help us get (ii) to w= ork? > Then musl distros like Alpine could have libstak as some kind of "compati= bility" layer. > Of course (i) might be a better solution, if you aren't so concerned abou= t getcontext, setcontext, makecontext and swapcontext "deprecation status". Unfortunately, libtask does not actually contain/provide getcontext() or setcontext(). It only provides makecontext() and swapcontext(). Implementing a library that has these functions is on my todo list. William