guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, master, updated. release_1-9-2-334-g4c


From: Ludovic Courtès
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-2-334-g4cf72f0
Date: Wed, 09 Sep 2009 22:23:36 +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=4cf72f0ba67fb2ca412d4e1142c4f5f87d7e5cec

The branch, master has been updated
       via  4cf72f0ba67fb2ca412d4e1142c4f5f87d7e5cec (commit)
       via  9d19a9d61c58053984efa834df2b099efdde1ffc (commit)
       via  7b96f3ddfd88f72915afa86eade5c9c91746a59a (commit)
      from  6dc797eee9041498eec7053d32d8721c3660fb51 (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 4cf72f0ba67fb2ca412d4e1142c4f5f87d7e5cec
Author: Ludovic Courtès <address@hidden>
Date:   Thu Sep 10 00:21:08 2009 +0200

    Remove unnecessary uses of `scm_{leave,enter}_guile ()'.
    
    * libguile/threads.c (scm_pthread_cond_wait,
      scm_pthread_cond_timedwait): Remove `scm_{leave,enter}_guile ()'
      calls.

commit 9d19a9d61c58053984efa834df2b099efdde1ffc
Author: Ludovic Courtès <address@hidden>
Date:   Thu Feb 12 23:20:15 2009 +0100

    Link with `-z relro' when available.
    
    * acinclude.m4 (GUILE_GNU_LD_RELRO): New macro.
    
    * configure.in: Use `GUILE_GNU_LD_RELRO'.

commit 7b96f3ddfd88f72915afa86eade5c9c91746a59a
Author: Ludovic Courtès <address@hidden>
Date:   Wed Sep 9 23:01:28 2009 +0200

    Update `NEWS'.

-----------------------------------------------------------------------

Summary of changes:
 NEWS               |   27 +++++++++++++++++++++++++--
 acinclude.m4       |   18 ++++++++++++++++++
 configure.ac       |    4 ++++
 libguile/threads.c |   24 ++++++++++++++----------
 4 files changed, 61 insertions(+), 12 deletions(-)

diff --git a/NEWS b/NEWS
index 9821ee2..5785596 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,15 @@ prerelease, and a full NEWS corresponding to 1.8 -> 2.0.)
 Changes in 1.9.3 (since the 1.9.2 prerelease):
 
 
+** Guile now uses libgc, the Boehm-Demers-Weiser garbage collector
+
+The semantics of `scm_gc_malloc ()' have been changed, in a
+backward-compatible way.  A new allocation routine,
+`scm_gc_malloc_pointerless ()', was added.
+
+Libgc is a conservative GC, which we hope will make interaction with C
+code easier and less error-prone.
+
 ** Files loaded with `load' will now be compiled automatically.
 
 As with files loaded via `primitive-load-path', `load' will also compile
@@ -101,6 +110,7 @@ This content is now included in Guile's manual directly.
 Interested users should see the ChangeLog for more information.
 
 
+
 Changes in 1.9.x (since the 1.8.x series):
 
 * New modules (see the manual for details)
@@ -692,6 +702,15 @@ respectively.
 
 * Changes to the C interface
 
+** Guile now uses libgc, the Boehm-Demers-Weiser garbage collector
+
+The semantics of `scm_gc_malloc ()' have been changed, in a
+backward-compatible way.  A new allocation routine,
+`scm_gc_malloc_pointerless ()', was added.
+
+Libgc is a conservative GC, which we hope will make interaction with C
+code easier and less error-prone.
+
 ** The GH interface (deprecated in version 1.6, 2001) was removed.
 
 ** Internal `scm_i_' functions now have "hidden" linkage with GCC/ELF
@@ -760,10 +779,14 @@ macros should now require `guile-2.0' instead of 
`guile-1.8'.
 If $(libdir) is /usr/lib, for example, Guile will install its .go files
 to /usr/lib/guile/1.9/ccache. These files are architecture-specific.
 
-** New dependency: GNU libunistring.
+** New dependency: libgc
+
+See http://www.hpl.hp.com/personal/Hans_Boehm/gc/, for more information.
+
+** New dependency: GNU libunistring
 
 See http://www.gnu.org/software/libunistring/, for more information. Our
-unicode support uses routines from libunistring.
+Unicode support uses routines from libunistring.
 
 
 
diff --git a/acinclude.m4 b/acinclude.m4
index 5629263..edabf24 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -311,6 +311,24 @@ fi
 AC_LANG_RESTORE
 ])dnl ACX_PTHREAD
 
+dnl GUILE_GNU_LD_RELRO
+dnl
+dnl Check whether GNU ld's read-only relocations (the `PT_GNU_RELRO'
+dnl ELF segment header) are supported.  This allows things like
+dnl statically allocated cells (1) to eventually be remapped read-only
+dnl by the loader, and (2) to be identified as pointerless by the
+dnl garbage collector.
+AC_DEFUN([GUILE_GNU_LD_RELRO], [
+  AC_MSG_CHECKING([whether the linker understands `-z relro'])
+
+  save_LDFLAGS="$LDFLAGS"
+  LDFLAGS="$LDFLAGS -Wl,-z -Wl,relro"
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
+    [AC_MSG_RESULT([yes])],
+    [AC_MSG_RESULT([no])
+     LDFLAGS="$save_LDFLAGS"])
+])
+
 dnl GUILE_READLINE
 dnl
 dnl Check all the things needed by `guile-readline', the Readline
diff --git a/configure.ac b/configure.ac
index 0e878a2..f10df10 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1439,6 +1439,10 @@ esac
 
 AC_SUBST(GCC_CFLAGS)
 
+# Check for GNU ld's "-z relro".
+GUILE_GNU_LD_RELRO
+
+
 ## If we're creating a shared library (using libtool!), then we'll
 ## need to generate a list of .lo files corresponding to the .o files
 ## given in LIBOBJS.  We'll call it LIBLOBJS.
diff --git a/libguile/threads.c b/libguile/threads.c
index f440bf5..337dd11 100644
--- a/libguile/threads.c
+++ b/libguile/threads.c
@@ -1870,11 +1870,13 @@ scm_dynwind_pthread_mutex_lock (scm_i_pthread_mutex_t 
*mutex)
 int
 scm_pthread_cond_wait (scm_i_pthread_cond_t *cond, scm_i_pthread_mutex_t 
*mutex)
 {
-  scm_t_guile_ticket t = scm_leave_guile ();
-  ((scm_i_thread *)t)->held_mutex = mutex;
-  int res = scm_i_pthread_cond_wait (cond, mutex);
-  ((scm_i_thread *)t)->held_mutex = NULL;
-  scm_enter_guile (t);
+  int res;
+  scm_i_thread *t = SCM_I_CURRENT_THREAD;
+
+  t->held_mutex = mutex;
+  res = scm_i_pthread_cond_wait (cond, mutex);
+  t->held_mutex = NULL;
+
   return res;
 }
 
@@ -1883,11 +1885,13 @@ scm_pthread_cond_timedwait (scm_i_pthread_cond_t *cond,
                            scm_i_pthread_mutex_t *mutex,
                            const scm_t_timespec *wt)
 {
-  scm_t_guile_ticket t = scm_leave_guile ();
-  ((scm_i_thread *)t)->held_mutex = mutex;
-  int res = scm_i_pthread_cond_timedwait (cond, mutex, wt);
-  ((scm_i_thread *)t)->held_mutex = NULL;
-  scm_enter_guile (t);
+  int res;
+  scm_i_thread *t = SCM_I_CURRENT_THREAD;
+
+  t->held_mutex = mutex;
+  res = scm_i_pthread_cond_timedwait (cond, mutex, wt);
+  t->held_mutex = NULL;
+
   return res;
 }
 


hooks/post-receive
-- 
GNU Guile




reply via email to

[Prev in Thread] Current Thread [Next in Thread]