From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Mikael Djurfeldt Newsgroups: gmane.lisp.guile.user Subject: Re: Guile + pthreads + reentrancy? Date: Wed, 03 Mar 2004 11:24:27 -0500 Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Message-ID: References: <16442.35630.790674.12804@gargle.gargle.HOWL> <16453.9444.628161.289892@gargle.gargle.HOWL> 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 1078498936 14926 80.91.224.253 (5 Mar 2004 15:02:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 5 Mar 2004 15:02:16 +0000 (UTC) Cc: guile-user@gnu.org, djurfeldt@nada.kth.se Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri Mar 05 16:02:04 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 1AzGpv-00006e-00 for ; Fri, 05 Mar 2004 16:02:03 +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 1AzGpT-0008PR-V3 for guile-user@m.gmane.org; Fri, 05 Mar 2004 10:01:35 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1AyZE9-00068v-8i for guile-user@gnu.org; Wed, 03 Mar 2004 11:28:09 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1AyZBc-0005jX-LH for guile-user@gnu.org; Wed, 03 Mar 2004 11:26:03 -0500 Original-Received: from [213.212.20.77] (helo=kvast.blakulla.net) by monty-python.gnu.org with esmtp (Exim 4.30) id 1AyZAn-0005UB-Jq for guile-user@gnu.org; Wed, 03 Mar 2004 11:24:41 -0500 Original-Received: from chunk.mit.edu ([18.42.2.92] helo=chunk ident=Debian-exim) by kvast.blakulla.net with esmtp (Exim 3.36 #1 (Debian)) id 1AyZAd-00056O-00; Wed, 03 Mar 2004 17:24:31 +0100 Original-Received: from mdj by chunk with local (Exim 4.30) id 1AyZAZ-0000L2-9Q; Wed, 03 Mar 2004 11:24:27 -0500 Original-To: bindej@rpi.edu In-Reply-To: <16453.9444.628161.289892@gargle.gargle.HOWL> (bindej@rpi.edu's message of "Tue, 2 Mar 2004 19:20:52 -0500") User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) 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:2887 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.user:2887 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 ()? 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?) BTW, while the "old" parts of the thread API are pretty stable, the new parts added in HEAD are still under development, so while there probably won't be any major changes, some things *will* change. M _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://mail.gnu.org/mailman/listinfo/guile-user