guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.7-140-g183d2


From: Ludovic Courtès
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.7-140-g183d2ac
Date: Fri, 01 Mar 2013 17:00:45 +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=183d2ace576710079a2bcf2a8bfcbc39b7d9becc

The branch, stable-2.0 has been updated
       via  183d2ace576710079a2bcf2a8bfcbc39b7d9becc (commit)
       via  01b69e79f617db3c68b117512b6fe29978ba0ebb (commit)
       via  0f595d7d1d57b12036bef801538163d3773567c3 (commit)
      from  764246cfbbfff21b3127fff500e972e1dc4314e3 (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 183d2ace576710079a2bcf2a8bfcbc39b7d9becc
Author: Ludovic Courtès <address@hidden>
Date:   Fri Mar 1 17:49:24 2013 +0100

    doc: Fix build with Texinfo 5.0.
    
    * doc/ref/api-control.texi (Handling Errors): Move misplaced description
      for `scm_memory_error' & co.
    * doc/ref/r6rs.texi (rnrs base): Change `deffnx' of `let-syntax' and
      `letrec-syntax' to fit on one line.

commit 01b69e79f617db3c68b117512b6fe29978ba0ebb
Author: Ludovic Courtès <address@hidden>
Date:   Fri Mar 1 17:45:17 2013 +0100

    Allow the SMOB mark procedures to be called when libgc uses parallel 
markers.
    
    Fixes <http://bugs.gnu.org/13611>.
    Reported by Mike Gran <address@hidden>.
    
    * libguile/smob.c (current_mark_stack_pointer,
      current_mark_stack_limit): New variables.
      (smob_mark): Use CURRENT_MARK_STACK_POINTER and
      CURRENT_MARK_STACK_LIMIT instead of the same-named fields of
      `SCM_I_CURRENT_THREAD'.
      (scm_gc_mark): Likewise.
      (scm_smob_prehistory): Initialize CURRENT_MARK_STACK_LIMIT and
      CURRENT_MARK_STACK_POINTER.
    * libguile/threads.h (scm_i_thread): Add comment that
      `current_mark_stack_ptr' and `current_mark_stack_limit' are no longer
      used.

commit 0f595d7d1d57b12036bef801538163d3773567c3
Author: Ludovic Courtès <address@hidden>
Date:   Fri Mar 1 17:36:21 2013 +0100

    Use accessors instead of symbols deprecated in libgc 7.3.
    
    * configure.ac: Check for `GC_set_all_interior_pointers',
      `GC_get_gc_no', and `GC_set_java_finalization'.
    * libguile/gc.c (scm_gc_stats)[HAVE_GC_GET_GC_NO]: Use `GC_get_gc_no'.
      (scm_storage_prehistory)[HAVE_GC_SET_ALL_INTERIOR_POINTERS]: Use
      `GC_set_all_interior_pointers'.
    * libguile/guardians.c (scm_init_guardians)[HAVE_GC_SET_JAVA_FINALIZATION]:
      Use `GC_set_java_finalization'.

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

Summary of changes:
 configure.ac             |    7 +++++-
 doc/ref/api-control.texi |    6 ++--
 doc/ref/r6rs.texi        |    8 ++----
 libguile/gc.c            |   16 ++++++++++++++-
 libguile/guardians.c     |    8 ++++++-
 libguile/smob.c          |   49 +++++++++++++++++++++++----------------------
 libguile/threads.h       |    7 +++--
 7 files changed, 63 insertions(+), 38 deletions(-)

diff --git a/configure.ac b/configure.ac
index 8848339..cbad0a1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1229,7 +1229,12 @@ save_LIBS="$LIBS"
 LIBS="$BDW_GC_LIBS $LIBS"
 CFLAGS="$BDW_GC_CFLAGS $CFLAGS"
 
-AC_CHECK_FUNCS([GC_do_blocking GC_call_with_gc_active GC_pthread_exit 
GC_pthread_cancel GC_allow_register_threads GC_pthread_sigmask 
GC_set_start_callback GC_get_heap_usage_safe GC_get_free_space_divisor 
GC_gcollect_and_unmap GC_get_unmapped_bytes GC_set_finalizer_notifier 
GC_set_finalize_on_demand])
+AC_CHECK_FUNCS([GC_do_blocking GC_call_with_gc_active GC_pthread_exit  \
+  GC_pthread_cancel GC_allow_register_threads GC_pthread_sigmask       \
+  GC_set_start_callback GC_get_heap_usage_safe                         \
+  GC_get_free_space_divisor GC_gcollect_and_unmap GC_get_unmapped_bytes        
\
+  GC_set_finalizer_notifier GC_set_finalize_on_demand                  \
+  GC_set_all_interior_pointers GC_get_gc_no GC_set_java_finalization])
 
 # Though the `GC_do_blocking ()' symbol is present in GC 7.1, it is not
 # declared, and has a different type (returning void instead of
diff --git a/doc/ref/api-control.texi b/doc/ref/api-control.texi
index 95c4925..ea943d3 100644
--- a/doc/ref/api-control.texi
+++ b/doc/ref/api-control.texi
@@ -1,7 +1,7 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Guile Reference Manual.
address@hidden Copyright (C)  1996, 1997, 2000, 2001, 2002, 2003, 2004, 2009, 
2010, 2011, 2012
address@hidden   Free Software Foundation, Inc.
address@hidden Copyright (C)  1996, 1997, 2000, 2001, 2002, 2003, 2004, 2009, 
2010,
address@hidden   2011, 2012, 2013 Free Software Foundation, Inc.
 @c See the file guile.texi for copying conditions.
 
 @node Control Mechanisms
@@ -1732,8 +1732,8 @@ and the call to these routines doesn't change 
@code{errno}.
 @deftypefnx {C Function} void scm_wrong_type_arg (char address@hidden, int 
@var{argnum}, SCM @var{bad_value})
 @deftypefnx {C Function} void scm_wrong_type_arg_msg (char address@hidden, int 
@var{argnum}, SCM @var{bad_value}, const char address@hidden)
 @deftypefnx {C Function} void scm_memory_error (char address@hidden)
-Throw an error with the various keys described above.
 @deftypefnx {C Function} void scm_misc_error (const char address@hidden, const 
char address@hidden, SCM @var{args})
+Throw an error with the various keys described above.
 
 In @code{scm_wrong_num_args}, @var{proc} should be a Scheme symbol
 which is the name of the procedure incorrectly invoked.  The other
diff --git a/doc/ref/r6rs.texi b/doc/ref/r6rs.texi
index 2028ada..13f9e20 100644
--- a/doc/ref/r6rs.texi
+++ b/doc/ref/r6rs.texi
@@ -1,6 +1,6 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Guile Reference Manual.
address@hidden Copyright (C)  2010, 2011, 2012
address@hidden Copyright (C)  2010, 2011, 2012, 2013
 @c   Free Software Foundation, Inc.
 @c See the file guile.texi for copying conditions.
 
@@ -273,10 +273,8 @@ grouped below by the existing manual sections to which 
they correspond.
 @end deffn
 
 @deffn {Scheme Syntax} define-syntax keyword expression
address@hidden {Scheme Syntax} let-syntax ((keyword transformer) @dots{})
-                        exp1 exp2 @dots{}
address@hidden {Scheme Syntax} letrec-syntax ((keyword transformer) @dots{})
-                        exp1 exp2 @dots{}
address@hidden {Scheme Syntax} let-syntax ((keyword transformer) @dots{}) exp1 
exp2 @dots{}
address@hidden {Scheme Syntax} letrec-syntax ((keyword transformer) @dots{}) 
exp1 exp2 @dots{}
 @xref{Defining Macros}, for documentation.
 @end deffn
 
diff --git a/libguile/gc.c b/libguile/gc.c
index 06b5044..6e459c3 100644
--- a/libguile/gc.c
+++ b/libguile/gc.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2006, 2008, 
2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2006,
+ *   2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -317,7 +318,13 @@ SCM_DEFINE (scm_gc_stats, "gc-stats", 0, 0, 0,
 
   GC_get_heap_usage_safe (&heap_size, &free_bytes, &unmapped_bytes,
                           &bytes_since_gc, &total_bytes);
+#ifdef HAVE_GC_GET_GC_NO
+  /* This function was added in 7.2alpha2 (June 2009).  */
+  gc_times = GC_get_gc_no ();
+#else
+  /* This symbol is deprecated as of 7.3.  */
   gc_times = GC_gc_no;
+#endif
 
   answer =
     scm_list_n (scm_cons (sym_gc_time_taken, scm_from_long (gc_time_taken)),
@@ -629,7 +636,14 @@ GC_set_finalize_on_demand (int foo)
 void
 scm_storage_prehistory ()
 {
+#ifdef HAVE_GC_SET_ALL_INTERIOR_POINTERS
+  /* This function was added in 7.2alpha2 (June 2009).  */
+  GC_set_all_interior_pointers (0);
+#else
+  /* This symbol is deprecated in 7.3.  */
   GC_all_interior_pointers = 0;
+#endif
+
   free_space_divisor = scm_getenv_int ("GC_FREE_SPACE_DIVISOR", 3);
   minimum_free_space_divisor = free_space_divisor;
   target_free_space_divisor = free_space_divisor;
diff --git a/libguile/guardians.c b/libguile/guardians.c
index 022f54e..6ba8c0b 100644
--- a/libguile/guardians.c
+++ b/libguile/guardians.c
@@ -1,5 +1,5 @@
 /* Copyright (C) 1998,1999,2000,2001, 2006, 2008, 2009, 2011,
- *   2012 Free Software Foundation, Inc.
+ *   2012, 2013 Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -351,7 +351,13 @@ void
 scm_init_guardians ()
 {
   /* We use unordered finalization `a la Java.  */
+#ifdef HAVE_GC_SET_JAVA_FINALIZATION
+  /* This function was added in 7.2alpha2 (June 2009).  */
+  GC_set_java_finalization (1);
+#else
+  /* This symbol is deprecated as of 7.3.  */
   GC_java_finalization = 1;
+#endif
 
   tc16_guardian = scm_make_smob_type ("guardian", 0);
 
diff --git a/libguile/smob.c b/libguile/smob.c
index c2e8f24..90849a8 100644
--- a/libguile/smob.c
+++ b/libguile/smob.c
@@ -1,5 +1,6 @@
-/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2003, 2004, 2006, 2009, 2010, 
2011, 2012 Free Software Foundation, Inc.
- * 
+/* Copyright (C) 1995, 1996, 1998, 1999, 2000, 2001, 2003, 2004, 2006,
+ *   2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
+ *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
  * as published by the Free Software Foundation; either version 3 of
@@ -284,6 +285,10 @@ scm_make_smob (scm_t_bits tc)
 /* The GC kind used for SMOB types that provide a custom mark procedure.  */
 static int smob_gc_kind;
 
+/* Mark stack pointer and limit, used by `scm_gc_mark'.  */
+static scm_i_pthread_key_t current_mark_stack_pointer;
+static scm_i_pthread_key_t current_mark_stack_limit;
+
 
 /* The generic SMOB mark procedure that gets called for SMOBs allocated
    with smob_gc_kind.  */
@@ -322,14 +327,14 @@ smob_mark (GC_word *addr, struct GC_ms_entry 
*mark_stack_ptr,
     {
       SCM obj;
 
-      SCM_I_CURRENT_THREAD->current_mark_stack_ptr = mark_stack_ptr;
-      SCM_I_CURRENT_THREAD->current_mark_stack_limit = mark_stack_limit;
+      scm_i_pthread_setspecific (current_mark_stack_pointer, mark_stack_ptr);
+      scm_i_pthread_setspecific (current_mark_stack_limit, mark_stack_limit);
 
       /* Invoke the SMOB's mark procedure, which will in turn invoke
-        `scm_gc_mark ()', which may modify `current_mark_stack_ptr'.  */
+        `scm_gc_mark', which may modify `current_mark_stack_pointer'.  */
       obj = scm_smobs[smobnum].mark (cell);
 
-      mark_stack_ptr = SCM_I_CURRENT_THREAD->current_mark_stack_ptr;
+      mark_stack_ptr = scm_i_pthread_getspecific (current_mark_stack_pointer);
 
       if (SCM_NIMP (obj))
        /* Mark the returned object.  */
@@ -337,42 +342,35 @@ smob_mark (GC_word *addr, struct GC_ms_entry 
*mark_stack_ptr,
                                           mark_stack_ptr,
                                           mark_stack_limit, NULL);
 
-      SCM_I_CURRENT_THREAD->current_mark_stack_limit = NULL;
-      SCM_I_CURRENT_THREAD->current_mark_stack_ptr = NULL;
+      scm_i_pthread_setspecific (current_mark_stack_pointer, NULL);
+      scm_i_pthread_setspecific (current_mark_stack_limit, NULL);
     }
 
   return mark_stack_ptr;
 
 }
 
-/* Mark object O.  We assume that this function is only called during the
-   mark phase, i.e., from within `smob_mark ()' or one of its
-   descendents.  */
+/* Mark object O.  We assume that this function is only called during the mark
+   phase, i.e., from within `smob_mark' or one of its descendants.  */
 void
 scm_gc_mark (SCM o)
 {
-#define CURRENT_MARK_PTR                                                \
-  ((struct GC_ms_entry *)(SCM_I_CURRENT_THREAD->current_mark_stack_ptr))
-#define CURRENT_MARK_LIMIT                                                \
-  ((struct GC_ms_entry *)(SCM_I_CURRENT_THREAD->current_mark_stack_limit))
-
   if (SCM_NIMP (o))
     {
-      /* At this point, the `current_mark_*' fields of the current thread
-        must be defined (they are set in `smob_mark ()').  */
-      register struct GC_ms_entry *mark_stack_ptr;
+      void *mark_stack_ptr, *mark_stack_limit;
 
-      if (!CURRENT_MARK_PTR)
+      mark_stack_ptr = scm_i_pthread_getspecific (current_mark_stack_pointer);
+      mark_stack_limit = scm_i_pthread_getspecific (current_mark_stack_limit);
+
+      if (mark_stack_ptr == NULL)
        /* The function was not called from a mark procedure.  */
        abort ();
 
       mark_stack_ptr = GC_MARK_AND_PUSH (SCM2PTR (o),
-                                        CURRENT_MARK_PTR, CURRENT_MARK_LIMIT,
+                                        mark_stack_ptr, mark_stack_limit,
                                         NULL);
-      SCM_I_CURRENT_THREAD->current_mark_stack_ptr = mark_stack_ptr;
+      scm_i_pthread_setspecific (current_mark_stack_pointer, mark_stack_ptr);
     }
-#undef CURRENT_MARK_PTR
-#undef CURRENT_MARK_LIMIT
 }
 
 
@@ -473,6 +471,9 @@ scm_smob_prehistory ()
 {
   long i;
 
+  scm_i_pthread_key_create (&current_mark_stack_pointer, NULL);
+  scm_i_pthread_key_create (&current_mark_stack_limit, NULL);
+
   smob_gc_kind = GC_new_kind (GC_new_free_list (),
                              GC_MAKE_PROC (GC_new_proc (smob_mark), 0),
                              0,
diff --git a/libguile/threads.h b/libguile/threads.h
index ec129bc..901c37b 100644
--- a/libguile/threads.h
+++ b/libguile/threads.h
@@ -3,7 +3,8 @@
 #ifndef SCM_THREADS_H
 #define SCM_THREADS_H
 
-/* Copyright (C) 1996,1997,1998,2000,2001, 2002, 2003, 2004, 2006, 2007, 2008, 
2009, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2006,
+ *   2007, 2008, 2009, 2011, 2013 Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -71,8 +72,8 @@ typedef struct scm_i_thread {
   scm_i_pthread_cond_t sleep_cond;
   int sleep_fd, sleep_pipe[2];
 
-  /* Information about the Boehm-GC mark stack during the mark phase.  This
-     is used by `scm_gc_mark ()'.  */
+  /* XXX: These two fields used to hold information about the BDW-GC
+     mark stack during the mark phase.  They are no longer used.  */
   void *current_mark_stack_ptr;
   void *current_mark_stack_limit;
 


hooks/post-receive
-- 
GNU Guile



reply via email to

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