[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Patch] --with-threads on MinGW
From: |
Kevin Ryde |
Subject: |
Re: [Patch] --with-threads on MinGW |
Date: |
Thu, 14 Dec 2006 11:40:54 +1100 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
Nils Durner <address@hidden> 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.
--- 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 */
- [Patch] --with-threads on MinGW, Nils Durner, 2006/12/03
- Re: [Patch] --with-threads on MinGW, Kevin Ryde, 2006/12/03
- Re: [Patch] --with-threads on MinGW, Nils Durner, 2006/12/04
- Re: [Patch] --with-threads on MinGW, Kevin Ryde, 2006/12/13
- Re: [Patch] --with-threads on MinGW, Kevin Ryde, 2006/12/13
- Re: [Patch] --with-threads on MinGW, Kevin Ryde, 2006/12/13
- Re: [Patch] --with-threads on MinGW, Nils Durner, 2006/12/14
- Re: [Patch] --with-threads on MinGW, Kevin Ryde, 2006/12/14
- Re: [Patch] --with-threads on MinGW,
Kevin Ryde <=
Re: [Patch] --with-threads on MinGW, Kevin Ryde, 2006/12/13