[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.11-52-gf184e
From: |
Ludovic Courtès |
Subject: |
[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.11-52-gf184e88 |
Date: |
Fri, 04 Jul 2014 13:58:51 +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=f184e887a6cb09a97cf34feab30eeba4a28a3ae4
The branch, stable-2.0 has been updated
via f184e887a6cb09a97cf34feab30eeba4a28a3ae4 (commit)
via 8c75d3ae01ed98ccb623bdff1c25cc17c046145c (commit)
via df8c52e93dfa3965e4714275f4b8cea2c8e0170b (commit)
from c53b5d891fb8369abcb7fb3f8d00e134ab7b2d9b (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 f184e887a6cb09a97cf34feab30eeba4a28a3ae4
Author: Ludovic Courtès <address@hidden>
Date: Fri Jul 4 15:52:15 2014 +0200
build: Support pthread builds without 'pthread_cancel' support (Android).
Reported by Sylvain Beucler <address@hidden>.
* configure.ac: Check for 'pthread_cancel'.
* libguile/threads.c (scm_cancel_thread): Conditionalize on
!SCM_USE_PTHREAD_THREADS || defined HAVE_PTHREAD_CANCEL.
* test-suite/tests/threads.test (require-cancel-thread): New procedure.
("timed joining fails if timeout exceeded", "join-thread returns
timeoutval on timeout", "cancel succeeds", "handler result passed to
join", "can cancel self"): Use it.
commit 8c75d3ae01ed98ccb623bdff1c25cc17c046145c
Author: Ludovic Courtès <address@hidden>
Date: Fri Jul 4 15:37:38 2014 +0200
build: Use 'LT_LIB_M' to determine whether -lm is needed.
* configure.ac: Use 'LT_LIB_M' instead of 'AC_CHECK_LIB(m, cos)'.
Suggested by Sylvain Beucler <address@hidden>.
commit df8c52e93dfa3965e4714275f4b8cea2c8e0170b
Author: Ludovic Courtès <address@hidden>
Date: Fri Jul 4 15:35:06 2014 +0200
Recognize arm-* target triplets.
Reported by Sylvain Beucler <address@hidden>.
* module/system/base/target.scm (cpu-endianness): Add case where CPU is
"arm".
* test-suite/tests/asm-to-bytecode.test
("cross-compilation")["arm-unknown-linux-androideabi"]:
New test.
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 12 +++++++-----
libguile/threads.c | 7 +++++++
module/system/base/target.scm | 4 +++-
test-suite/tests/asm-to-bytecode.test | 5 ++++-
test-suite/tests/threads.test | 13 ++++++++++++-
5 files changed, 33 insertions(+), 8 deletions(-)
diff --git a/configure.ac b/configure.ac
index 552a91b..a323f70 100644
--- a/configure.ac
+++ b/configure.ac
@@ -692,10 +692,9 @@ AC_TYPE_GETGROUPS
AC_TYPE_SIGNAL
AC_TYPE_MODE_T
-# On mingw -lm is empty, so this test is unnecessary, but it's
-# harmless so we don't hard-code to suppress it.
-#
-AC_CHECK_LIB(m, cos)
+dnl Check whether we need -lm.
+LT_LIB_M
+LIBS="$LIBS $LIBM"
AC_CHECK_FUNCS(gethostbyname)
if test $ac_cv_func_gethostbyname = no; then
@@ -1372,8 +1371,11 @@ case "$with_threads" in
# pthread_attr_get_np - "np" meaning "non portable" says it
# all; specific to FreeBSD
# pthread_sigmask - not available on mingw
+ # pthread_cancel - not available on Android (Bionic libc)
#
- AC_CHECK_FUNCS(pthread_attr_getstack pthread_getattr_np
pthread_get_stackaddr_np pthread_attr_get_np pthread_sigmask)
+ AC_CHECK_FUNCS([pthread_attr_getstack pthread_getattr_np \
+ pthread_get_stackaddr_np pthread_attr_get_np pthread_sigmask \
+ pthread_cancel])
# 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 15e4919..6ae6818 100644
--- a/libguile/threads.c
+++ b/libguile/threads.c
@@ -1156,6 +1156,11 @@ SCM_DEFINE (scm_yield, "yield", 0, 0, 0,
}
#undef FUNC_NAME
+/* Some systems, notably Android, lack 'pthread_cancel'. Don't provide
+ 'cancel-thread' on these systems. */
+
+#if !SCM_USE_PTHREAD_THREADS || defined HAVE_PTHREAD_CANCEL
+
SCM_DEFINE (scm_cancel_thread, "cancel-thread", 1, 0, 0,
(SCM thread),
"Asynchronously force the target @var{thread} to terminate. @var{thread} "
@@ -1181,6 +1186,8 @@ SCM_DEFINE (scm_cancel_thread, "cancel-thread", 1, 0, 0,
}
#undef FUNC_NAME
+#endif
+
SCM_DEFINE (scm_set_thread_cleanup_x, "set-thread-cleanup!", 2, 0, 0,
(SCM thread, SCM proc),
"Set the thunk @var{proc} as the cleanup handler for the thread @var{thread}. "
diff --git a/module/system/base/target.scm b/module/system/base/target.scm
index c74ae67..cefa951 100644
--- a/module/system/base/target.scm
+++ b/module/system/base/target.scm
@@ -1,6 +1,6 @@
;;; Compilation targets
-;; Copyright (C) 2011, 2012, 2013 Free Software Foundation, Inc.
+;; Copyright (C) 2011, 2012, 2013, 2014 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
@@ -72,6 +72,8 @@
(endianness big))
((string-match "^arm.*el" cpu)
(endianness little))
+ ((string=? "arm" cpu) ;ARMs are LE by default
+ (endianness little))
(else
(error "unknown CPU endianness" cpu)))))
diff --git a/test-suite/tests/asm-to-bytecode.test
b/test-suite/tests/asm-to-bytecode.test
index 6d2f20e..62ea0ed 100644
--- a/test-suite/tests/asm-to-bytecode.test
+++ b/test-suite/tests/asm-to-bytecode.test
@@ -1,6 +1,6 @@
;;;; Assembly to bytecode compilation -*- mode: scheme; coding: utf-8; -*-
;;;;
-;;;; Copyright (C) 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
+;;;; Copyright (C) 2010, 2011, 2012, 2013, 2014 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
@@ -205,6 +205,9 @@
(test-target "x86_64-unknown-linux-gnux32" ; x32 ABI (Debian tuplet)
(endianness little) 4)
+ (test-target "arm-unknown-linux-androideabi"
+ (endianness little) 4)
+
(pass-if-exception "unknown target"
exception:miscellaneous-error
(call-with-values (lambda ()
diff --git a/test-suite/tests/threads.test b/test-suite/tests/threads.test
index 8178120..3b7a3e4 100644
--- a/test-suite/tests/threads.test
+++ b/test-suite/tests/threads.test
@@ -1,6 +1,7 @@
;;;; threads.test --- Tests for Guile threading. -*- scheme -*-
;;;;
-;;;; Copyright 2003, 2006, 2007, 2009, 2010, 2011, 2012, 2013 Free Software
Foundation, Inc.
+;;;; Copyright 2003, 2006, 2007, 2009, 2010, 2011, 2012, 2013,
+;;;; 2014 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
@@ -36,6 +37,11 @@
(equal? '(a b c) '(a b c))
a))
+(define (require-cancel-thread)
+ ;; Skip the test when 'cancel-thread' is unavailable.
+ (unless (defined? 'cancel-thread)
+ (throw 'unresolved)))
+
(if (provided? 'threads)
(begin
@@ -277,6 +283,7 @@
(with-test-prefix "join-thread"
(pass-if "timed joining fails if timeout exceeded"
+ (require-cancel-thread)
(let* ((m (make-mutex))
(c (make-condition-variable))
(t (begin-thread (begin (lock-mutex m)
@@ -286,6 +293,7 @@
(not r)))
(pass-if "join-thread returns timeoutval on timeout"
+ (require-cancel-thread)
(let* ((m (make-mutex))
(c (make-condition-variable))
(t (begin-thread (begin (lock-mutex m)
@@ -335,6 +343,7 @@
(with-test-prefix "cancel-thread"
(pass-if "cancel succeeds"
+ (require-cancel-thread)
(let ((m (make-mutex)))
(lock-mutex m)
(let ((t (begin-thread (begin (lock-mutex m) 'foo))))
@@ -343,6 +352,7 @@
#t)))
(pass-if "handler result passed to join"
+ (require-cancel-thread)
(let ((m (make-mutex)))
(lock-mutex m)
(let ((t (begin-thread (lock-mutex m))))
@@ -351,6 +361,7 @@
(eq? (join-thread t) 'foo))))
(pass-if "can cancel self"
+ (require-cancel-thread)
(let ((m (make-mutex)))
(lock-mutex m)
(let ((t (begin-thread (begin
hooks/post-receive
--
GNU Guile
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.11-52-gf184e88,
Ludovic Courtès <=