This is the mail archive of the
mailing list for the glibc project.
Re: Why was swapcontext removed from POSIX and will glibc continue to support it?
- From: Carlos O'Donell <carlos at redhat dot com>
- To: John Carter <john dot carter at taitradio dot com>, libc-help at sourceware dot org
- Date: Mon, 4 Jun 2018 21:35:23 -0400
- Subject: Re: Why was swapcontext removed from POSIX and will glibc continue to support it?
- References: <CAFD1m3EjyTPVdvnqUbqTUy7BXkXA0VjZOv4x-uxGihaXrUQ3tQ@mail.gmail.com>
On 06/04/2018 07:57 PM, John Carter wrote:
> Apparently swapcontext has been removed from the POSIX standard, (but
> it still part of glibc).
> Anybody know why they removed it?
You can ask the Austin Group, and it will likely be logged in their
issue tracker with all the rationale required for the change.
> Anybody know if I can rely on it's continued existence in glibc?
We have no plans to remove swapcontext() and the *context() family
of functions. However, these functions have a lot of genuine problems
in their uses, namely that the context object is of fixed size. A
new API is really what is needed.
If glibc were to deprecate the functions they would remain
as compatibility symbols for use by old applications for a very
long time (probably forever). Newly built applications would be
unable to link against those compatibility symbols. New applications
would have to use whatever new API exists at the time.
Does that answer your questions?