[前][次][番号順一覧][スレッド一覧]

ruby-changes:31147

From: nagachika <ko1@a...>
Date: Thu, 10 Oct 2013 00:38:03 +0900 (JST)
Subject: [ruby-changes:31147] nagachika:r43226 (ruby_2_0_0): merge revision(s) 43179, 43180, 43181, 43192, 43193: [Backport #8990] [Backport #9000]

nagachika	2013-10-10 00:37:54 +0900 (Thu, 10 Oct 2013)

  New Revision: 43226

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43226

  Log:
    merge revision(s) 43179,43180,43181,43192,43193: [Backport #8990] [Backport #9000]
    
    * configure.in, win32/Makefile.sub (FIBER_USE_NATIVE): move conditions
      from cont.c
    
    * cont.c (FIBER_USE_NATIVE): split long conditions.
    
    * cont.c: disable FIBER_USE_NATIVE on GNU/Hurd because it doesn't
      support a combination getcontext() and threads. Patch by
      Gabriele Giacone (1o5g4r8o@g...). [Bug #8990][ruby-core:57685]

  Modified directories:
    branches/ruby_2_0_0/
  Modified files:
    branches/ruby_2_0_0/ChangeLog
    branches/ruby_2_0_0/cont.c
    branches/ruby_2_0_0/version.h
Index: ruby_2_0_0/ChangeLog
===================================================================
--- ruby_2_0_0/ChangeLog	(revision 43225)
+++ ruby_2_0_0/ChangeLog	(revision 43226)
@@ -1,3 +1,14 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1
+Thu Oct 10 00:24:01 2013  KOSAKI Motohiro  <kosaki.motohiro@g...>
+
+	* cont.c: disable FIBER_USE_NATIVE on GNU/Hurd because it doesn't
+	  support a combination getcontext() and threads. Patch by
+	  Gabriele Giacone (1o5g4r8o@g...). [Bug #8990][ruby-core:57685]
+
+Mon Oct  7 21:03:54 2013  Nobuyoshi Nakada  <nobu@r...>
+
+	* configure.in, win32/Makefile.sub (FIBER_USE_NATIVE): move conditions
+	  from cont.c
+
 Thu Oct 10 00:17:56 2013  KOSAKI Motohiro  <kosaki.motohiro@g...>
 
 	* test/dl/test_base.rb: {libc, libm} detection now handle GNU/Hurd
Index: ruby_2_0_0/cont.c
===================================================================
--- ruby_2_0_0/cont.c	(revision 43225)
+++ ruby_2_0_0/cont.c	(revision 43226)
@@ -15,9 +15,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/cont.c#L15
 #include "gc.h"
 #include "eval_intern.h"
 
-#if ((defined(_WIN32) && _WIN32_WINNT >= 0x0400) || (defined(HAVE_GETCONTEXT) && defined(HAVE_SETCONTEXT))) && !defined(__NetBSD__) && !defined(__sun) && !defined(__ia64) && !defined(FIBER_USE_NATIVE)
-#define FIBER_USE_NATIVE 1
-
 /* FIBER_USE_NATIVE enables Fiber performance improvement using system
  * dependent method such as make/setcontext on POSIX system or
  * CreateFiber() API on Windows.
@@ -29,12 +26,45 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/cont.c#L26
  * in Proc. of 51th Programming Symposium, pp.21--28 (2010) (in Japanese).
  */
 
+#if !defined(FIBER_USE_NATIVE)
+# if defined(HAVE_GETCONTEXT) && defined(HAVE_SETCONTEXT)
+#   if 0
+#   elif defined(__NetBSD__)
 /* On our experience, NetBSD doesn't support using setcontext() and pthread
  * simultaneously.  This is because pthread_self(), TLS and other information
  * are represented by stack pointer (higher bits of stack pointer).
  * TODO: check such constraint on configure.
  */
-#elif !defined(FIBER_USE_NATIVE)
+#     define FIBER_USE_NATIVE 0
+#   elif defined(__sun)
+/* On Solaris because resuming any Fiber caused SEGV, for some reason.
+ */
+#     define FIBER_USE_NATIVE 0
+#   elif defined(__ia64)
+/* At least, Linux/ia64's getcontext(3) doesn't save register window.
+ */
+#     define FIBER_USE_NATIVE 0
+#   elif defined(__GNU__)
+/* GNU/Hurd doesn't fully support getcontext, setcontext, makecontext
+ * and swapcontext functions. Disabling their usage till support is
+ * implemented. More info at
+ * http://darnassus.sceen.net/~hurd-web/open_issues/glibc/#getcontext
+ */
+#     define FIBER_USE_NATIVE 0
+#   else
+#     define FIBER_USE_NATIVE 1
+#   endif
+# elif defined(_WIN32)
+#   if _WIN32_WINNT >= 0x0400
+/* only when _WIN32_WINNT >= 0x0400 on Windows because Fiber APIs are
+ * supported only such building (and running) environments.
+ * [ruby-dev:41192]
+ */
+#     define FIBER_USE_NATIVE 1
+#   endif
+# endif
+#endif
+#if !defined(FIBER_USE_NATIVE)
 #define FIBER_USE_NATIVE 0
 #endif
 
Index: ruby_2_0_0/version.h
===================================================================
--- ruby_2_0_0/version.h	(revision 43225)
+++ ruby_2_0_0/version.h	(revision 43226)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1
 #define RUBY_VERSION "2.0.0"
 #define RUBY_RELEASE_DATE "2013-10-10"
-#define RUBY_PATCHLEVEL 329
+#define RUBY_PATCHLEVEL 330
 
 #define RUBY_RELEASE_YEAR 2013
 #define RUBY_RELEASE_MONTH 10

Property changes on: ruby_2_0_0
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r43179-43181,43192-43193


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]