This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
libgo patch committed: Non-futex system fix
- From: Ian Lance Taylor <iant at google dot com>
- To: gcc-patches at gcc dot gnu dot org, gofrontend-dev at googlegroups dot com
- Cc: ro at gcc dot gnu dot org
- Date: Fri, 06 Dec 2013 10:26:28 -0800
- Subject: libgo patch committed: Non-futex system fix
- Authentication-results: sourceware.org; auth=none
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();