Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 16627 invoked from network); 6 Mar 2009 16:28:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Mar 2009 16:28:27 -0000 Received: (qmail 63013 invoked by uid 500); 6 Mar 2009 16:28:26 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 62484 invoked by uid 500); 6 Mar 2009 16:28:24 -0000 Mailing-List: contact dev-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list dev@harmony.apache.org Received: (qmail 62473 invoked by uid 99); 6 Mar 2009 16:28:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Mar 2009 08:28:24 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of alexei.fedotov@gmail.com designates 74.125.46.152 as permitted sender) Received: from [74.125.46.152] (HELO yw-out-1718.google.com) (74.125.46.152) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Mar 2009 16:28:17 +0000 Received: by yw-out-1718.google.com with SMTP id 4so372807ywq.0 for ; Fri, 06 Mar 2009 08:27:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=YBooJrNvhVHC8+zt3PIRbEXf0LKinqc6/h/7D6437KQ=; b=qCSuXuesWvSD5Pn5XiUs3Ie5YoZXk3kHJm+BsU4j6xcgG2s1ib01+vWT0YHGEGpVUT sk8nKmyaL5PejmOJQsjVoX9GraewxGFBKqA52LPRu10Sn5Tq/CafyyjjCD+FqJzSTiZM 2n7z0z6Rl72zhW5vCKnOARn7aud0wEogjjjME= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=oNBOJz4mHxbJaseJf8ldPbxhPyB/EtClg6kLWA7IDQlPGgLYaniCUolqqKmUZtRPBO qUVzeD/uxKOQkBdHMnj9jPN+PyNwcPH5WsB8bcGneWCut/rodxUlnrw3bptwbbp5biib HdGJhDiN8OWrUvoKfkyyUgExuJd2i4uIy/Nsk= MIME-Version: 1.0 Received: by 10.151.113.5 with SMTP id q5mr4675188ybm.62.1236356876516; Fri, 06 Mar 2009 08:27:56 -0800 (PST) In-Reply-To: References: Date: Fri, 6 Mar 2009 19:27:56 +0300 Message-ID: Subject: Re: The state of signal portability From: Alexei Fedotov To: dev@harmony.apache.org Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Ian, > fit into the Harmony eco-system correctly I have not caught why APR does not fit into the Harmony eco-system correctly. It really does because all these portability functions are just trivial wrappers for OS calls, and Harmony VM is a living example. I feel from your letter that you like portlib - if you are determined, then I suggest restoring signal functionality from M7 in M8. I would not recommend forking at M7. Open sourcers needed to concentrate their efforts, hence the last version is always the preferable one. Thanks. On Fri, Mar 6, 2009 at 6:15 PM, Ian Rogers wr= ote: > Hi, > > I'm in the process of trying to make a VM run using the Harmony class > libraries and I'm having some trouble with portlib when I need to impleme= nt > signals. In the hyport header there are still routines relating to signal > handling, but looking into the portlib code they have no implementation. = I > believe all signal handling code from portlib was removed prior to M8. > Looking around for inspiration I believe the situation is: > > 1) IBM VMEs use Harmony's portlib and then implements threads and signal > handling using services available from the host OS, the thread services a= re > exported back to Harmony via hythr.so > > 2) DRLVM in part uses the Harmony porting layer, in part uses Apache > Portable Runtime (APR) and in part uses services from the host OS > > Using APR is tempting, but as it doesn't underly the Harmony portlib it > seems to lead to a mismatch with APR managing somethings and Harmony othe= rs > (ie. who allocates data structures for signal handlers APR using an APR > memory pool or Harmony using its). Of course I could rewrite the portlib > using APR, but this is a lot of work. The reserve/commit virtual memory > routines in portlib are also not reflected in APR. > > What I'd like is for each service I need for the VM to be wrapped up in a > portable way. I'd naively assumed portlib did this, which it does except = for > signal handling. I'd like to avoid maintaining thread and signal librarie= s > for all architecture and OS combinations. Harmony's portlib doesn't conta= in > a solution for signals, APR does contain a solution but doesn't appear to > fit into the Harmony eco-system correctly. I'm left with mixing Harmony's > thread implementation with bespoke signal handler implementations, perhap= s > the cleanest and easiest way for me to get these is from a M7 version of = the > portlib. > > Has anybody else found a sensible way to avoid this pain? > > Thanks, > Ian Rogers > --=20 =F3 =D5=D7=C1=D6=C5=CE=C9=C5=CD, =E1=CC=C5=CB=D3=C5=CA =E6=C5=C4=CF=D4=CF=D7, http://people.apache.org/~aaf/