[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.3-91-gba20d2
From: |
Andy Wingo |
Subject: |
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.3-91-gba20d26 |
Date: |
Thu, 22 Dec 2011 15:35:12 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".
http://git.savannah.gnu.org/cgit/guile.git/commit/?id=ba20d2629eea673b10c74c1f8168821709ed3807
The branch, stable-2.0 has been updated
via ba20d2629eea673b10c74c1f8168821709ed3807 (commit)
via c1d5d6d755ff1613ff92efad841487c9e5bb979b (commit)
from 34cf38c3a2eb143d982aa14e76888098aea468b2 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit ba20d2629eea673b10c74c1f8168821709ed3807
Author: Andy Wingo <address@hidden>
Date: Thu Dec 22 10:30:45 2011 -0500
freebsd itanium support
* libguile/threads.c (scm_ia64_register_backing_store_base)
(scm_ia64_ar_bsp): Provide implementation of these itanium helpers on
freebsd. Thanks to Jim Pryor.
commit c1d5d6d755ff1613ff92efad841487c9e5bb979b
Author: Andy Wingo <address@hidden>
Date: Thu Dec 22 10:28:23 2011 -0500
freebsd implementation of get_thread_stack_base
* configure.ac: Check for pthread_np.h and pthread_attr_get_np. Patch
by Jim Pryor.
* libguile/threads.c (get_thread_stack_base): Provide an implementation
for FreeBSD.
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 7 +++++--
libguile/threads.c | 42 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 47 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index bf9ecdf..0455375 100644
--- a/configure.ac
+++ b/configure.ac
@@ -775,6 +775,7 @@ AC_CHECK_FUNCS([DINFINITY DQNAN cexp chsize clog clog10
ctermid fesetround ftime
# sys/param.h - not in mingw
# pthread.h - only available with pthreads. ACX_PTHREAD doesn't
# check this specifically, we need it for the timespec test below.
+# pthread_np.h - available on FreeBSD
# sethostname - the function itself check because it's not in mingw,
# the DECL is checked because Solaris 10 doens't have in any header
# hstrerror - on Tru64 5.1b the symbol is available in libc but the
@@ -782,7 +783,7 @@ AC_CHECK_FUNCS([DINFINITY DQNAN cexp chsize clog clog10
ctermid fesetround ftime
# cuserid - on Tru64 5.1b the declaration is documented to be available
# only with `_XOPEN_SOURCE' or some such.
#
-AC_CHECK_HEADERS([crypt.h netdb.h pthread.h sys/param.h sys/resource.h
sys/file.h sys/mman.h])
+AC_CHECK_HEADERS([crypt.h netdb.h pthread.h pthread_np.h sys/param.h
sys/resource.h sys/file.h sys/mman.h])
AC_CHECK_FUNCS(chroot flock getlogin cuserid getpriority setpriority getpass
sethostname gethostname)
AC_CHECK_DECLS([sethostname, hstrerror, cuserid])
@@ -1364,9 +1365,11 @@ case "$with_threads" in
# all; not present on MacOS X or Solaris 10
# pthread_get_stackaddr_np - "np" meaning "non portable" says it
# all; specific to MacOS X
+ # pthread_attr_get_np - "np" meaning "non portable" says it
+ # all; specific to FreeBSD
# pthread_sigmask - not available on mingw
#
- AC_CHECK_FUNCS(pthread_attr_getstack pthread_getattr_np
pthread_get_stackaddr_np pthread_sigmask)
+ AC_CHECK_FUNCS(pthread_attr_getstack pthread_getattr_np
pthread_get_stackaddr_np pthread_attr_get_np pthread_sigmask)
# On past versions of Solaris, believe 8 through 10 at least, you
# had to write "pthread_once_t foo = { PTHREAD_ONCE_INIT };".
diff --git a/libguile/threads.c b/libguile/threads.c
index f71c83c..3d98e5e 100644
--- a/libguile/threads.c
+++ b/libguile/threads.c
@@ -38,6 +38,10 @@
#include <sys/time.h>
#endif
+#if HAVE_PTHREAD_NP_H
+# include <pthread_np.h>
+#endif
+
#include <assert.h>
#include <fcntl.h>
#include <nproc.h>
@@ -141,6 +145,29 @@ get_thread_stack_base ()
return pthread_get_stackaddr_np (pthread_self ());
}
+#elif HAVE_PTHREAD_ATTR_GET_NP
+/* This one is for FreeBSD 9. */
+static void *
+get_thread_stack_base ()
+{
+ pthread_attr_t attr;
+ void *start, *end;
+ size_t size;
+
+ pthread_attr_init (&attr);
+ pthread_attr_get_np (pthread_self (), &attr);
+ pthread_attr_getstack (&attr, &start, &size);
+ pthread_attr_destroy (&attr);
+
+ end = (char *)start + size;
+
+#if SCM_STACK_GROWS_UP
+ return start;
+#else
+ return end;
+#endif
+}
+
#else
#error Threads enabled with old BDW-GC, but missing get_thread_stack_base
impl. Please upgrade to libgc >= 7.1.
#endif
@@ -2201,6 +2228,21 @@ scm_ia64_ar_bsp (const void *opaque)
return (void *) ctx->uc_mcontext.sc_ar_bsp;
}
# endif /* linux */
+# ifdef __FreeBSD__
+# include <ucontext.h>
+void *
+scm_ia64_register_backing_store_base (void)
+{
+ return (void *)0x8000000000000000;
+}
+void *
+scm_ia64_ar_bsp (const void *opaque)
+{
+ const ucontext_t *ctx = opaque;
+ return (void *)(ctx->uc_mcontext.mc_special.bspstore
+ + ctx->uc_mcontext.mc_special.ndirty);
+}
+# endif /* __FreeBSD__ */
#endif /* __ia64__ */
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.3-91-gba20d26,
Andy Wingo <=