unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Kevin Ryde <user42@zip.com.au>
Cc: bug-guile@gnu.org
Subject: Re: [Patch] --with-threads on MinGW
Date: Thu, 14 Dec 2006 11:40:54 +1100	[thread overview]
Message-ID: <87psanmhrd.fsf@zip.com.au> (raw)
In-Reply-To: <457490A5.80601@web.de> (Nils Durner's message of "Mon, 04 Dec 2006 22:18:29 +0100")

[-- Attachment #1: Type: text/plain, Size: 497 bytes --]

Nils Durner <ndurner@web.de> 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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: threads.c.mingw-stack-base.diff --]
[-- Type: text/x-diff, Size: 538 bytes --]

--- 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 */
 

[-- Attachment #3: Type: text/plain, Size: 137 bytes --]

_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-guile

  parent reply	other threads:[~2006-12-14  0:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-03 18:26 [Patch] --with-threads on MinGW Nils Durner
2006-12-04  0:31 ` Kevin Ryde
2006-12-04 21:18   ` Nils Durner
2006-12-13 23:29     ` Kevin Ryde
2006-12-13 23:55     ` Kevin Ryde
2006-12-14  0:09       ` Kevin Ryde
2006-12-14 22:12       ` Nils Durner
2006-12-15  0:24         ` Kevin Ryde
2006-12-14  0:40     ` Kevin Ryde [this message]
2006-12-14  0:12 ` Kevin Ryde
2006-12-14 21:42   ` Nils Durner
2006-12-15  0:25     ` Kevin Ryde
2006-12-27  0:10       ` Kevin Ryde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87psanmhrd.fsf@zip.com.au \
    --to=user42@zip.com.au \
    --cc=bug-guile@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).