From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Julian Graham" Newsgroups: gmane.lisp.guile.devel Subject: srfi-18 requirements Date: Wed, 10 Oct 2007 21:54:37 -0400 Message-ID: <2bc5f8210710101854m1254160ei451026182b87e767@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1192067697 5218 80.91.229.12 (11 Oct 2007 01:54:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 11 Oct 2007 01:54:57 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Oct 11 03:54:55 2007 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IfnGI-0000kA-8F for guile-devel@m.gmane.org; Thu, 11 Oct 2007 03:54:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IfnGB-00012L-W8 for guile-devel@m.gmane.org; Wed, 10 Oct 2007 21:54:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IfnG5-00010g-A1 for guile-devel@gnu.org; Wed, 10 Oct 2007 21:54:41 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IfnG4-0000zP-BG for guile-devel@gnu.org; Wed, 10 Oct 2007 21:54:40 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IfnG4-0000yz-1S for guile-devel@gnu.org; Wed, 10 Oct 2007 21:54:40 -0400 Original-Received: from fk-out-0910.google.com ([209.85.128.191]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IfnG3-0001Xe-M0 for guile-devel@gnu.org; Wed, 10 Oct 2007 21:54:39 -0400 Original-Received: by fk-out-0910.google.com with SMTP id 19so353537fkr for ; Wed, 10 Oct 2007 18:54:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=06FcqMPx1cRCgBMI1uqg0CY3C3j/fbriBVUpVvWG5oI=; b=t6vLLQ+Hio3NG0nrTjXHdQg8AP0QtM1ALZJ635uQm5qJR8hqhqOJJJ0OXZMxiIDlApm56YaDC/LIB1g/y+nJr+hLVYG/3kOsG8GZNar9uuejB8Oi8XT6ucKzrhFDO3lKLwWKF52R7RNHSInZRpM8NKDcQ4GUzj56ctImuKahYis= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=eVzWDpsmx+0jCrJ9nhc/qqma7TYPfMfzzv26Rft0ZuCH0dPlG9J2+fdzQrYqLPAqxtwwsE37Sbtk2oTtLUbcBkrWO9htURgYnErfY+iX/lo7+yxOYWbQy2G3GD3QlAGEbXQxpT9UUGRDMohz6C+gsPbYec+M0SCl9od79l+QMCQ= Original-Received: by 10.82.138.6 with SMTP id l6mr2795886bud.1192067677315; Wed, 10 Oct 2007 18:54:37 -0700 (PDT) Original-Received: by 10.82.176.12 with HTTP; Wed, 10 Oct 2007 18:54:37 -0700 (PDT) Content-Disposition: inline X-Detected-Kernel: Linux 2.6 (newer, 2) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:6834 Archived-At: Hi guys, While I was waiting to get my copyright assignment sorted out, I started trying to figure out what it would take to add SRFI-18 (http://srfi.schemers.org/srfi-18/srfi-18.html) support to Guile. I think a lot of it can be safely done in Scheme (mostly by mapping the SRFI's proposed API onto what's already in Guile), but there are a few things that'd require further modification to the C core. Specifically: * Type predicates: thread?, mutex?, and condition-variable?. * Mutex state: This kind of needs to happen in C, since we need to hook the actual lock / unlock calls in order to record the state changes. * Mutex unlocking outside the owner thread: The existing implementation claims the result of doing this is undefined, but what it actually does is mark the mutex unlocked and then throw an exception. I don't really think there's a technical reason to prohibit this, especially since Guile doesn't use the pthreads mutex implementation directly. * Mutex lock timeout: Not really sure how to do this -- maybe add a pthreads condition variable to the definition of fat_mutex. Supporting this with the existing lock-mutex code would also require a breaking change to the C API, and I don't know what the conditions are (if any) under which that's acceptable. All this kind of presumes that SRFI-18 is something that the Guile maintainers care about supporting. Is it? I'm afraid I don't know the Guile project's attitude towards implementing SRFIs. Regards, Julian _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel