From owner-freebsd-current@FreeBSD.ORG Sun Sep 27 10:41:21 2009 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E444A1065698; Sun, 27 Sep 2009 10:41:21 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id C0E378FC15; Sun, 27 Sep 2009 10:41:21 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 763DB46B23; Sun, 27 Sep 2009 06:41:21 -0400 (EDT) Date: Sun, 27 Sep 2009 11:41:21 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: arch@FreeBSD.org Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: current@FreeBSD.org Subject: [libdispatch-dev] GCD libdispatch w/Blocks support working on Free (f X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Sep 2009 10:41:22 -0000 Dear all-- Those of you at the Cambridge devsummit are already aware of the port of Apple's Grand Central Dispatch (GCD), a.k.a. libdispatch, to FreeBSD by Stacey Son and I, in collaboration with Apple. I've now uploaded my GCD talk slides to the wiki: http://wiki.freebsd.org/200909DevSummit We now have a devel/libdispatch port, which works out-of-the-box on FreeBSD 9-CURRENT. libdispatch requires modest changes to kqueue, which we will merge to 8.x once the code freeze lifts. As of yesterday, I have libdispatch working with Apple's "Blocks" C languae extension as found in clang, the last major architecture component required to use GCD-based applications FreeBSD. Jordan Hubbard at Apple has kindly provided the necessary bits bundled up in a clang/llvm/compiler-rt package for FreeBSD until the clang port is updated. Some details in the attached e-mail. As I mentioned at the FreeBSD developer summit, this is a work-in-progress (in particular, we don't support pthread work queues, which allow the kernel schedule to get involved in expanding the size of the thread worker pool dynamically), but it should now be more than adequate to use in practice. Robert N M Watson Computer Laboratory University of Cambridge ---------- Forwarded message ---------- Date: Sat, 26 Sep 2009 20:37:51 +0100 (BST) From: Robert Watson To: libdispatch-dev@lists.macosforge.org Subject: [libdispatch-dev] GCD libdispatch w/Blocks support working on FreeBSD Dear all: This is a quick update for those interested in the general portability of libdispatch, and perhaps specifically FreeBSD. With a bit of help from Jordan Hubbard, I now have libdispatch working with Blocks on FreeBSD. Jordan has put up a FreeBSD clang-devel package that includes Blocks parts and the C runtime bits here: http://static.macosforge.org/libdispatch/downloads/clang-devel.tgz I've updated the libdispatch build parts to detect and use Blocks when compiled with clang, and fixed a few nits in libdispatch that I ran into along the way (and one apparent clang bug). With Jordan's package as a starting point, Blocks pretty much "just worked", so I'm optimistic that people will be able to reproduce this on other platforms able to run the non-Blocks libdispatch without much difficulty. If you update to at least r45 of libdispatch, you should now be able to do: CC=clang ./configure --with-blocks-runtime=/usr/local/lib and get a libdispatch with Blocks support. The reason for the configure argument is that the current clang-devel package doesn't automatically add libBlocksRuntime dependency for binaries compiled with -fblocks. Once Blocks support shakes out a bit more in clang/FreeBSD, this should go away. I am able to run basic Blocks-based test tools with GCD on FreeBSD without difficulty. The FreeBSD port should be updated to reflect this shortly. Robert N M Watson Computer Laboratory University of Cambridge _______________________________________________ libdispatch-dev mailing list libdispatch-dev@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/libdispatch-dev