Nils Durner <[EMAIL PROTECTED]> 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 */
 
_______________________________________________
Bug-guile mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-guile

Reply via email to