On Mon, Feb 20, 2012, Kurt Miller wrote: > On Sunday 19 February 2012 4:33:35 pm Amit Kulkarni wrote:
>> There is some problem building sun's jdk 1.6 (devel/jdk/1.6) and >> lang/mono. Note this is with stock current (src,xenocara,ports) as of >> friday feb 17... CC'ing kurt@ and robert@. Can somebody look in there >> if they have time? What is the problem? > Thanks for the report. rthreads doesn't have functional > pthread_suspend_np() support yet, so ports using it will not work. That > covers most garbage collection based applications like the jdk and mono. > When pthread_suspend_np() is functional we can try these applications again. If the problem is just that the main thread can't be suspended, that's been fixed for ages I think. We just need to fix the library. Index: rthread_sched.c =================================================================== RCS file: /home/tedu/cvs/src/lib/librthread/rthread_sched.c,v retrieving revision 1.10 diff -u -p -r1.10 rthread_sched.c --- rthread_sched.c 19 Feb 2012 02:07:48 -0000 1.10 +++ rthread_sched.c 20 Feb 2012 20:06:15 -0000 @@ -136,13 +136,8 @@ pthread_suspend_np(pthread_t thread) if (thread == pthread_self()) return (EDEADLK); - /* - * XXX Avoid a bug in current signal handling by refusing to - * suspend the main thread. - */ - if (thread != &_initial_thread) - if (kill(thread->tid, SIGSTOP) == -1) - errn = errno; + if (kill(thread->tid, SIGSTOP) == -1) + errn = errno; return (errn); }