On 3/9/06, Archie Cobbs <[EMAIL PROTECTED]> wrote:
> Weldon Washburn wrote:
> > I can now run the below multithread Hello.java on JCHEVM using Apache
> > Harmony Class Library.  The output toggles between clumps of "Hello
> > World" and clumps of "*" as WindowsXP schedules the two application
> > threads.  This is behavior I would expect. I use System.out.write()
> > because System.out.println() does not work yet.   A summary follows:
>
> Wow! Impressive achievment & very cool.
>
> > Mods to JCHEVM to get it to work
> > 1)
> > I was not able to find the _JC_LIB_ENTRY that is intended for
> > read/writing files.  I gave up and "borrowed"
> > JCNI_java_lang_VMThread_nativeSetPriority().  Instead of actually
> > changing thread priority, it now does a "fprintf(stdout, "%s",
> > &priority); fflush(stdout);"  Perhaps you can tell me what native
> > method I should be using.
>
> Classpath supplies its own native methods for file I/O. That is,
> you can implement file I/O normally using normal native methods.
> This is not something the VM needs to be directly involved with.
> So the "fix" would be for classlib to implement this itself.

I suspected this.  But I could not figure out how to add a new entry
into _JC_LIB_ENTRY.  I tried but got a bunch of misc error messages so
I gave up.  If you give me some hints on how to add enties to
_JC_LIB_ENTRY, I will take a second stab at it.

>
> There's no reason you couldn't write a gnu.classpath.Pointer
> class if you wanted to. There's no copyright on the package
> name :-)

I just now wrote an Apache Harmony version of java.lang.Pointer and
java.lang.Pointer32.  It works fine.  I put it in the
Harmony/modules/kernel/src/main/java/java/lang directory.  It can be
move to another place and "re-packaged" once we figure out where it
should go.

>
> By the way jchevm's Thread.setPriority() doesn't work because
> I don't know how to implement it using POSIX.
>
> > 2)
> > I commented out some stuff in bootstrap.c that was dragging in
> > specific gnu classpath *.class files like "Lgnu/classpath/Pointer;"
> > We should discuss the best solution for this item.
>
> This is use as part of the NIO implementation for "direct" buffers.
> A Pointer object simply contains an int or long that holds a void *.
>
> > One last item.  I don't know which SVN repository to place this work
> > in.  Any suggestions?
>
> You could create a branch of classlib in the "sandbox".

Tim Ellison, Geir Magnusson,
I could create a ClassLib branch in the sandbox and call it
"kernel_path".  It would only contain the generic files needed to glue
a GNU ready JVM to Harmony Class Lib.  Thoughts?


>
> Cheers,
> -Archie
>
> __________________________________________________________________________
> Archie Cobbs      *        CTO, Awarix        *      http://www.awarix.com
>


--
Weldon Washburn
Intel Middleware Products Division

Reply via email to