Article View: comp.os.ms-windows.programmer.tools
Article #489Re: Looking for 32-bit, multithreading environment
From: Cameron Bromley
Date: Wed, 30 Sep 1992 10:38
Date: Wed, 30 Sep 1992 10:38
65 lines
3315 bytes
3315 bytes
In article <2573@cronos.metaphor.com> eli@Metaphor.COM (Eli Lauris) writes: > Hi, > > I am working on porting a complex OS/2 application to Windows 3.1 (Yah, you > heard it right: OS2 to Windows, not the other way). The application consists > of multiple processes and multiple DLL running on top of OS/2 2.0. > > What I am looking for is a nice development environment for Windows 3.1 that > will provide the following: > > 1. 32-bit protected mode environment There are a number of compilers on the market to do this (Watcom, Zortech, etc). Best read the FAQ (or even flick through a Windows techno-jock magazine). > 2. Multi-threading support I have seen at least one third-party thread library advertised (in Windows Tech Journal, I think). PCThreads, The TriTechnologies Company, (206)957-1579, Compuserve 70272,3671 also had a demo app/library which ran OK under 3.0, but does not work with 3.1. They may have finished the 3.1 product by now; I've not had any experience with it. It's also feasible (and very educational :-) ) to write your own thread library. I managed to port the unix c-threads library to Windows, and it has stuff like conditional variables, semaphores, etc. However, if you *really* need pre-emptive scheduling (as opposed to sprinkling calls to ThreadYield() in your code)...... > 3. Pre-emptive scheduling of processes/threads I'm not sure this is *possible* under Windows. You really need kernel support to do this in a way which is not so ugly as to make you weep. It may be possible to hook the timer interrupt, but the only re-entrant Windows function is PostMessage, which does not actually swap the process (let alone the thread) in. At least that's what the docs say. It may be possible to hook the timer and do a DirectedYield(). Has anybody tried this? The library mentioned above claims pre-emption, but I can't vouch for it. > 4. DLLs that have both instance and shared data Quite easy, although you need to pass the task id as a parameter to any function within the DLL that returns data. > 5. Inter-process semaphores Inter-process semaphores can be implemented with shared global memory and a DLL to manipulate the data structures. > I know its a little bit too much to ask for. After all, when you are done providing it, you pretty much have your OS/2 or NT. Yep. But don't forget about *real* memory protection, network support, security, *real* threads, no 640K crud, no interfering TSR's, long filenames, virtual addressing, etc, etc, etc. Cameron. -- --------------------------------------------------------------- Cameron Bromley Internet: cdb@codex.oz.au Codex Software Development Pty. Ltd. NextMail encouraged Phone +61-3-696-2490 Fax +61-3-696-6757
Technical Details
Message-ID:
<1992Sep30.103839.296@codex.oz.au>Path:
arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!yarrina.connect.com.au!codex!cdbReferences:
<2573@cronos.metaphor.com>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.tools Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!yarrina.connect.com.au!codex!cdb From: cdb@codex.oz.au (Cameron Bromley) Subject: Re: Looking for 32-bit, multithreading environment Message-ID: <1992Sep30.103839.296@codex.oz.au> Sender: cdb@codex.oz.au Organization: Codex Software Development Pty Ltd References: <2573@cronos.metaphor.com> Date: Wed, 30 Sep 92 10:38:39 GMT Lines: 65