This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

libgo patch committed: Non-futex system fix


This patch to libgo fixes the scheduler in the current libgo for systems
that do not use futexes, such as Solaris.  I fixed the futex code a
while back, but I managed to forget to fix the non-futex code.  This is
PR 59408.  Committed to mainline.

Ian

diff -r cc2d51f8c87a libgo/runtime/lock_sema.c
--- a/libgo/runtime/lock_sema.c	Tue Dec 03 17:34:17 2013 -0800
+++ b/libgo/runtime/lock_sema.c	Fri Dec 06 10:23:12 2013 -0800
@@ -152,8 +152,12 @@
 
 	m = runtime_m();
 
+  /* For gccgo it's OK to sleep in non-g0, and it happens in
+     stoptheworld because we have not implemented preemption.
+
 	if(runtime_g() != m->g0)
 		runtime_throw("notesleep not on g0");
+  */
 
 	if(m->waitsema == 0)
 		m->waitsema = runtime_semacreate();

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]