Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 57175 invoked from network); 9 Mar 2006 18:04:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Mar 2006 18:04:31 -0000 Received: (qmail 79634 invoked by uid 500); 9 Mar 2006 18:04:26 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 79571 invoked by uid 500); 9 Mar 2006 18:04:26 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 79557 invoked by uid 99); 9 Mar 2006 18:04:26 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Mar 2006 10:04:26 -0800 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=RCVD_IN_BL_SPAMCOP_NET,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of weldonwjw@gmail.com designates 64.233.166.177 as permitted sender) Received: from [64.233.166.177] (HELO pproxy.gmail.com) (64.233.166.177) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Mar 2006 10:04:23 -0800 Received: by pproxy.gmail.com with SMTP id f25so193600pyf for ; Thu, 09 Mar 2006 10:04:02 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=jD+1C2sJ768ey5cZdPCvm9tLAsakCPTCvSVZiF+YeKajhl4x6dDK12eKM+F+3Q0t2gTF5FpQNMGFS8gUHIfNBZwLypN7XvsDHOLfte+VqJdZelpRkeAigauMjuidNP/isy7jvNFhU0e9BIxeCncrYWTsCeO07iR3HdpmkB2bpFk= Received: by 10.35.99.5 with SMTP id b5mr1284630pym; Thu, 09 Mar 2006 10:04:02 -0800 (PST) Received: by 10.35.58.1 with HTTP; Thu, 9 Mar 2006 10:04:02 -0800 (PST) Message-ID: <4dd1f3f00603091004x3e4de72du59bc3d7564681074@mail.gmail.com> Date: Thu, 9 Mar 2006 10:04:02 -0800 From: "Weldon Washburn" To: harmony-dev@incubator.apache.org Subject: Re: [jchevm] Harmony Class Lib does "Hello World" on a GNU Classpath JVM In-Reply-To: <44106A5E.7050407@dellroad.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <4dd1f3f00603081549o6d47717er39296c53aa662960@mail.gmail.com> <44106A5E.7050407@dellroad.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On 3/9/06, Archie Cobbs 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.co= m > -- Weldon Washburn Intel Middleware Products Division