From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.lisp.guile.bugs Subject: Re: [Patch] --with-threads on MinGW Date: Thu, 14 Dec 2006 11:40:54 +1100 Message-ID: <87psanmhrd.fsf@zip.com.au> References: <457316BF.6090003@web.de> <87veks33jf.fsf@zip.com.au> <457490A5.80601@web.de> NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1166056939 19299 80.91.229.10 (14 Dec 2006 00:42:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 14 Dec 2006 00:42:19 +0000 (UTC) Cc: bug-guile@gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu Dec 14 01:42:17 2006 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1Guefq-0001Ny-AL for guile-bugs@m.gmane.org; Thu, 14 Dec 2006 01:42:10 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Guefp-0000dX-SB for guile-bugs@m.gmane.org; Wed, 13 Dec 2006 19:42:09 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Guefk-0000dF-Rz for bug-guile@gnu.org; Wed, 13 Dec 2006 19:42:04 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Guefj-0000d2-0b for bug-guile@gnu.org; Wed, 13 Dec 2006 19:42:04 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Guefi-0000cz-L9 for bug-guile@gnu.org; Wed, 13 Dec 2006 19:42:02 -0500 Original-Received: from [61.8.2.231] (helo=mailout2.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Guefi-0003Bc-EV for bug-guile@gnu.org; Wed, 13 Dec 2006 19:42:02 -0500 Original-Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id 78D706E180; Thu, 14 Dec 2006 11:41:59 +1100 (EST) Original-Received: from localhost (ppp245A.dyn.pacific.net.au [61.8.36.90]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id C83318C32; Thu, 14 Dec 2006 11:41:54 +1100 (EST) Original-Received: from gg by localhost with local (Exim 4.63) (envelope-from ) id 1Gueer-0007KK-33; Thu, 14 Dec 2006 11:41:09 +1100 Original-To: Nils Durner In-Reply-To: <457490A5.80601@web.de> (Nils Durner's message of "Mon, 04 Dec 2006 22:18:29 +0100") User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:3429 Archived-At: --=-=-= Nils Durner writes: > > pthread_attr_getstack() exists, but pthread_getattr_np() doesn't. How about the change below (untested), to keep out of the hair of the _np bits. That getattr_np is confusing. Is the right way to create an attr object with pthread_attr_init, use it for pthread_create, then use it again later with pthread_attr_getstack if you want to ask something? If that could be passed down through the levels of guile inits it'd get rid of a "non-portable" call. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=threads.c.mingw-stack-base.diff --- threads.c.~1.84.2.6.~ 2006-12-14 10:52:15.000000000 +1100 +++ threads.c 2006-12-14 11:36:37.000000000 +1100 @@ -629,7 +629,16 @@ } } -#endif /* HAVE_PTHREAD_ATTR_GETSTACK && HAVE_PTHREAD_GETATTR_NP */ +#elif defined (__MINGW32__) +/* In mingw the basic scm_get_stack_base can be used in any thread. */ +#define HAVE_GET_THREAD_STACK_BASE +static SCM_STACKITEM * +get_thread_stack_base () +{ + return scm_get_stack_base (); +} + +#endif /* pthread methods of get_thread_stack_base */ #else /* !SCM_USE_PTHREAD_THREADS */ --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Bug-guile mailing list Bug-guile@gnu.org http://lists.gnu.org/mailman/listinfo/bug-guile --=-=-=--