From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Mikael Djurfeldt Newsgroups: gmane.lisp.guile.devel Subject: Re: crypt mutex Date: Mon, 23 Feb 2004 20:22:19 -0500 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: References: <87znbdi85m.fsf@zip.com.au> <87znb98v9x.fsf@zagadka.ping.de> <87vflxwaaz.fsf@ID-28718.user.uni-berlin.de> Reply-To: djurfeldt@nada.kth.se NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1077586908 25695 80.91.224.253 (24 Feb 2004 01:41:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 24 Feb 2004 01:41:48 +0000 (UTC) Cc: djurfeldt@nada.kth.se, guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Feb 24 02:41:39 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AvRZr-0001tR-00 for ; Tue, 24 Feb 2004 02:41:39 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1AvRZe-0006N7-CO for guile-devel@m.gmane.org; Mon, 23 Feb 2004 20:41:26 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1AvRWM-00050t-Ou for guile-devel@gnu.org; Mon, 23 Feb 2004 20:38:02 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1AvRTd-0003wR-EE for guile-devel@gnu.org; Mon, 23 Feb 2004 20:35:44 -0500 Original-Received: from [213.212.20.77] (helo=kvast.blakulla.net) by monty-python.gnu.org with esmtp (Exim 4.30) id 1AvRHE-0000hc-S9 for guile-devel@gnu.org; Mon, 23 Feb 2004 20:22:25 -0500 Original-Received: from witch ([209.150.45.158]) by kvast.blakulla.net with esmtp (Exim 3.36 #1 (Debian)) id 1AvRHA-0007dh-00; Tue, 24 Feb 2004 02:22:21 +0100 Original-Received: from mdj by witch with local (Exim 3.35 #1 (Debian)) id 1AvRHA-0003on-00; Mon, 23 Feb 2004 20:22:20 -0500 Original-To: Andreas Voegele In-Reply-To: <87vflxwaaz.fsf@ID-28718.user.uni-berlin.de> (Andreas Voegele's message of "Tue, 24 Feb 2004 02:11:48 +0100") User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:3447 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:3447 Andreas Voegele writes: > I'd also prefer a minimal policy. But what do you do if operating > system A provides the reentrant function foo_r() while operating > system B provides foo() only? The Scheme procedure "foo" should > behave the same on both systems. > > I think that there are four options: > > 1. Use foo_r() if available, otherwise protect foo() with a mutex > internally. > > 2. Use foo() and tell the user to protect the Scheme procedure in > threaded programs. It doesn't make sense to use foo_r() in this > scenario. > > 3. Provide two Scheme procedures: "foo" and a thread safe version > "foo-r". "foo-r" uses foo() and a mutex if foo_r() isn't > available. > > 4. Provide two modules, a normal and a thread safe version. A command > line switch could be used to request thread safety. IMHO this > would be useful for stuff like the POSIX and networking procedures. Of these options I think 3 and 4 would add more complexity than is payed for, and prefer 1 above 2 if foo_r isn't too uncommon. M _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel