🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer.misc
Article #9

Re: Q: How do DLLs and threads work in OS/2? (VX-REXX)

#9
From: Eric Giguere
Date: Fri, 20 Oct 1995 03:58
20 lines
1363 bytes
You're confusing threads vs. processes.  You start a new process each
time you run an executable.  Each process has 1 or more threads running
in it, and it's the threads within the same process that you have
to worry about, since each thread has access to all the memory space
used and allocated by any other thread inside the same process.

Depending on your linker options (or .DEF file for non-Watcom users)
you can set up your DLL so that its data is shared between threads
in different processes or only between threads in the same process.
Usually you want the latter, and that's the case you have.

Here's what you should do to explore this further:  read up about
the StartThread method in VX-REXX and then add a second thread to
your program.  Make both threads call into your DLL and see what 
happens.

After that experiment you'll want to learn about critical sections
and semaphores.

Eric
Technical Details
Message-ID: <DGqB16.Gn4@undergrad.math.uwaterloo.ca>
Path: arc1-ca.pugleaf.net!undergrad.math.uwaterloo.ca!giguere

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer.misc,comp.lang.rexx
Path: arc1-ca.pugleaf.net!undergrad.math.uwaterloo.ca!giguere
From: giguere@csg.uwaterloo.ca (Eric Giguere)
Subject: Re: Q: How do DLLs and threads work in OS/2? (VX-REXX)
Sender: news@undergrad.math.uwaterloo.ca (news spool owner)
Message-ID: <DGqB16.Gn4@undergrad.math.uwaterloo.ca>
Date: Fri, 20 Oct 1995 03:58:18 GMT
Nntp-Posting-Host: csg.uwaterloo.ca
Organization: University of Waterloo