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. v2.1.0-47-g9ec1573


From: Mark H Weaver
Subject: [Guile-commits] GNU Guile branch, master, updated. v2.1.0-47-g9ec1573
Date: Sun, 22 May 2011 19:45:44 +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=9ec1573d2b9463043df79b9a2cb30acc6afaeaaa

The branch, master has been updated
       via  9ec1573d2b9463043df79b9a2cb30acc6afaeaaa (commit)
      from  a1a3a0dd5d8cb03ea16c604b2e82038474315bea (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 9ec1573d2b9463043df79b9a2cb30acc6afaeaaa
Author: Mark H Weaver <address@hidden>
Date:   Sun May 22 15:23:27 2011 -0400

    Don't call scm_lock_mutex and scm_unlock_mutex via pointer of wrong type
    
    * libguile/threads.c (lock_mutex_return_void, unlock_mutex_return_void):
      New static functions that simply call scm_lock_mutex and
      scm_unlock_mutex, respectively, but return void instead of SCM.
    
      (scm_dynwind_lock_mutex): Pass unlock_mutex_return_void to
      scm_dynwind_unwind_handler_with_scm, and lock_mutex_return_void to
      scm_dynwind_rewind_handler_with_scm.  Previously, we passed
      scm_unlock_mutex and scm_lock_mutex (which return SCM), but the
      scm_dynwind_* functions expect pointers to functions which return
      void.  When SCM is of type union, this changes the calling conventions
      of the functions on some platforms (e.g. GCC 4.5.2 and 4.5.3 on x86).

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

Summary of changes:
 libguile/threads.c |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/libguile/threads.c b/libguile/threads.c
index 468d1f8..07138a5 100644
--- a/libguile/threads.c
+++ b/libguile/threads.c
@@ -1456,12 +1456,24 @@ SCM_DEFINE (scm_lock_mutex_timed, "lock-mutex", 1, 2, 0,
 }
 #undef FUNC_NAME
 
+static void
+lock_mutex_return_void (SCM mx)
+{
+  (void) scm_lock_mutex (mx);
+}
+
+static void
+unlock_mutex_return_void (SCM mx)
+{
+  (void) scm_unlock_mutex (mx);
+}
+
 void
 scm_dynwind_lock_mutex (SCM mutex)
 {
-  scm_dynwind_unwind_handler_with_scm ((void(*)(SCM))scm_unlock_mutex, mutex,
+  scm_dynwind_unwind_handler_with_scm (unlock_mutex_return_void, mutex,
                                       SCM_F_WIND_EXPLICITLY);
-  scm_dynwind_rewind_handler_with_scm ((void(*)(SCM))scm_lock_mutex, mutex,
+  scm_dynwind_rewind_handler_with_scm (lock_mutex_return_void, mutex,
                                       SCM_F_WIND_EXPLICITLY);
 }
 


hooks/post-receive
-- 
GNU Guile



reply via email to

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