Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!ncar!csn!cherokee!bighorn!rml From: rml@bighornuswest.com (Robert Lund) Newsgroups: comp.lang.c++ Subject: Re: AT&T C++ 2.1 Task Library Message-ID: <1991Jun4.143542.16431@cherokee.uswest.com> Date: 4 Jun 91 14:35:42 GMT References: <1991Jun04.082950.1918@lut.ac.uk> Sender: rml@bighorn (Robert Lund) Organization: U S WEST Advanced Technologies Lines: 35 Nntp-Posting-Host: bighorn.uswest.com In article <1991Jun04.082950.1918@lut.ac.uk>, cojrp@lut.ac.uk (JR Pitchers) writes: > We have purchased AT&T C++ for our HP 840 system. We have ported all but the > Task Library. According to the documentation, AT&T have ported it to various > targets, eg: AT&T 3B20, DEC VAX, Sun2s & Sun3s etc. However, it has not been > ported to RISC based targets, such HP 800s. Furthermore, the documentation > makes it clear that porting the Task Library to RISC based targets is very > difficult and beyond the scope of the of the manual. I have studied the manual > and come to the conclusion that it is well beyond my capability. > > Has anyone out there ported the AT&T C++ Task Library to an HP 800 series > target? I should be most grateful for any assistance. > > Thanks in advance, Jeff Pitchers Loughborough University. > > E-Mail: J.R.Pitchers@uk.ac.lut (JANET) I have not ported the task library to an HP RISC but I have ported it to a sun 4 (SPARC). Sun 4 os provides support for lightweight processes (LWPs). I used these as a basis for creation and scheduling of C++ tasks. If the HP os provides threads or LWPs, then you may be able to do a similar port. Basically, what I did was to make every C++ task a LWP. I got rid of the C++ task scheduler because the LWP system provides its own scheduler. The LWP system provides an inter-LWP communication facility but I elected to port the qhead and qtail classes provided in the task library. The resulting library has the same classes (except for the scheduler) and interfaces as the original AT&T release, except for the minor point that each task must define a void main() as the task entry point (rather than the task's constructor). The port took a couple of days, which included learning enough about the task library and the LWP system to write the code (which turned out to be a minor effort). Hope this helps. Bob Lund