Boost logo

Boost Users :

Subject: [Boost-users] [Context] Mac OS X support?
From: Nat Linden (nat_at_[hidden])
Date: 2011-03-09 17:35:58


I just glanced over the proposed Boost.Context library documentation
prior to a more thorough read, and this TODO item jumped out at me:

* support of Mac OS X

This is one of our major target platforms. However, it's worth noting
that Mac OS X 10.5 introduced support for the ucontext family.

We are currently using the (proposed) Boost.Coroutine library [1],
[2], a GSoC project from a couple years back. On Windows,
Boost.Coroutine uses fibers; on Posix platforms, it uses ucontext.
Because Mac OS X 10.4 did not yet support ucontext, I hacked in
context-switching for that target based on the Pth library [3].

Boost.Coroutine did not introduce a context-library abstraction layer.
Presumably one of the fruits of accepting Boost.Context would be the
opportunity to port the Boost.Coroutine API to use Boost.Context
rather than its own (similar but not as well-encapsulated)
underpinnings. (If anyone cares -- I realize that acceptance of
Boost.Fiber could make Boost.Coroutine moot. I intend to read up on
that too.)

Anyway -- it seems likely to me that Boost.Context will support Mac OS
X 10.5+ "out of the box." I intend to check that.

If it's important for Boost.Context to support Mac OS X <= 10.4, it
might be fairly straightforward to implement the Boost.Context API on
top of Pth. Reference [2] contains my macro-based attempt to establish
equivalences between the ucontext API and the Pth API.

However, at this moment in history, one must ask how important it
still is to support Mac OS X <= 10.4?

[1] http://www.crystalclearsoftware.com/soc/coroutine/
[2] http://www.boostpro.com/vault/index.php?action=downloadfile&filename=boost-coroutine-2009-12-01.tar.gz&directory=Concurrent%20Programming
[3] http://www.gnu.org/software/pth/


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net