From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: bindej@rpi.edu Newsgroups: gmane.lisp.guile.user Subject: Re: Guile + pthreads + reentrancy? Date: Wed, 3 Mar 2004 12:35:31 -0500 Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Message-ID: <16454.5987.645837.251040@gargle.gargle.HOWL> References: <16442.35630.790674.12804@gargle.gargle.HOWL> <16453.9444.628161.289892@gargle.gargle.HOWL> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1078522713 11802 80.91.224.253 (5 Mar 2004 21:38:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 5 Mar 2004 21:38:33 +0000 (UTC) Cc: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri Mar 05 22:38:24 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 1AzN1U-0006bO-00 for ; Fri, 05 Mar 2004 22:38:24 +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 1AzMy6-00046t-6l for guile-user@m.gmane.org; Fri, 05 Mar 2004 16:34:54 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1AyaI1-000307-KX for guile-user@gnu.org; Wed, 03 Mar 2004 12:36:13 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1AyaHR-0002lY-RL for guile-user@gnu.org; Wed, 03 Mar 2004 12:36:10 -0500 Original-Received: from [128.113.2.4] (helo=smtp4.server.rpi.edu) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.30) id 1AyaHR-0002kw-3L for guile-user@gnu.org; Wed, 03 Mar 2004 12:35:37 -0500 Original-Received: from localhost (mankey-39.dynamic.rpi.edu [128.113.194.48]) by smtp4.server.rpi.edu (8.12.8/8.12.8) with ESMTP id i23HZWdx025596; Wed, 3 Mar 2004 12:35:33 -0500 Original-To: guile-user@gnu.org In-Reply-To: X-Mailer: VM 7.18 under Emacs 21.3.1 X-Scanned-By: CanIt (www . canit . ca) X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.user:2890 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:2890 Mikael Djurfeldt writes: > bindej@rpi.edu writes: > > > Mikael Djurfeldt writes: > > > Each thread which has been spawned by scm_spawn_thread, that is. > > > > > > scm_spawn_thread calls pthread_create and sets up Guile things. If, > > > for some reason, you need to create the pthread yourself and want to > > > later make it able to use Guile, that could be arranged. Please tell > > > me and I'll add this to the API (this is on the TODO list). > > > > > > M > > > > I'm now converting my code to use scm_spawn_thread instead of > > pthread_create. This is not a problem, but there doesn't seem to be > > any public interface to get a scm_t_thread out of the SCM object. > > You're right that there isn't currently any public interface for > getting the scm_t_thread value out of the SCM object. > > > This is a serious problem because even functions such as > > scm_thread_join take scm_t_thread arguments, and are thus unusable > > outside of Guile. > > > > What should I do about this? > > Would it be difficult to use scm_thread_self ()? Somewhat. The value is supposed to be available to the parent thread immediately, so to be safe I would need to use a condition variable and a global variable to communicate. > We should probably add a selector for this, though. I'll try to add > it to CVS HEAD today. (Do you need it in 1.6?) My program requires 1.7 anyway, so no. _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user