This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: [gcj-eclipse-merge-branch] MinGW ecj: Cross-built ecjx?! (was Re: ecj branch)
Mohan Embar writes:
> Hi Andrew,
>
> > > After commenting out all the park/unpark
> > > related stuff
> >
>
> >I'm surprised you had trouble with that. I thought I fixed the Windows
> >version, but I never tested it. Oh well.
>
> :) (see attached)
>
> Nevertheless, I'm surprised things went as well as they did. The cross-built
> ecjx.exe is going to be a tougher nut to crack, though....
>
>
> Index: sun/misc/natUnsafe.cc
> ===================================================================
> --- sun/misc/natUnsafe.cc (revision 119467)
> +++ sun/misc/natUnsafe.cc (working copy)
> @@ -238,11 +238,11 @@
> void
> sun::misc::Unsafe::unpark (::java::lang::Thread *thread)
> {
> - _Jv_ThreadUnpark (thread);
> +// _Jv_ThreadUnpark (thread);
> }
>
> void
> sun::misc::Unsafe::park (jboolean isAbsolute, jlong time)
> {
> - _Jv_ThreadPark (isAbsolute, time);
> +// _Jv_ThreadPark (isAbsolute, time);
> }
WHy is this necessary? I put definitions of _Jv_ThreadPark etc in
win32-threads.cc.
> Index: java/lang/natThread.cc
> ===================================================================
> --- java/lang/natThread.cc (revision 119467)
> +++ java/lang/natThread.cc (working copy)
> @@ -54,8 +54,8 @@
> _Jv_MutexInit (&nt->join_mutex);
> _Jv_CondInit (&nt->join_cond);
>
> - pthread_mutex_init (&nt->park_mutex, NULL);
> - pthread_cond_init (&nt->park_cond, NULL);
> +// pthread_mutex_init (&nt->park_mutex, NULL);
> +// pthread_cond_init (&nt->park_cond, NULL);
>
> nt->thread = _Jv_ThreadInitData (this);
> // FIXME: if JNI_ENV is set we will want to free it. It is
> @@ -76,8 +76,8 @@
> #endif
> _Jv_FreeJNIEnv((JNIEnv*)nt->jni_env);
>
> - pthread_mutex_destroy (&nt->park_mutex);
> - pthread_cond_destroy (&nt->park_cond);
> +// pthread_mutex_destroy (&nt->park_mutex);
> +// pthread_cond_destroy (&nt->park_cond);
> }
Oh, yeah, that's just me being silly. :-(
These should be _Jv_MutexInit.
>
> jint
> @@ -131,7 +131,7 @@
>
> // Even though we've interrupted this thread, it might still be
> // parked.
> - _Jv_ThreadUnpark (this);
> +// _Jv_ThreadUnpark (this);
> }
> }
>
> Index: java/lang/natRuntime.cc
> ===================================================================
> --- java/lang/natRuntime.cc (revision 119467)
> +++ java/lang/natRuntime.cc (working copy)
> @@ -290,7 +290,7 @@
> jstringArray env,
> java::io::File *dir)
> {
> - return new _Jv_platform_process (cmd, env, dir);
> + return new ::java::lang::Win32Process (cmd, env, dir);
> }
I can't imagine why change this is necessary.
Andrew.