home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
VSCPPv8.zip
/
VACPP
/
IBMCPP
/
samples
/
TOOLKIT
/
OS2
/
QUEUES
/
README
< prev
next >
Wrap
Text File
|
1995-06-08
|
3KB
|
104 lines
QUEUES - Interprocess Communication Queue
DESCRIPTION:
QUEUES demonstrates interprocess communications (IPC) using the 32-bit
queue component. It consists of two executable programs,
SVRQUEUE.EXE and CLIQUEUE.EXE.
SVRQUEUE creates an IPC queue a named, shared-memory buffer for queue
elements and a shared, named, mutex (mutual exclusive) semaphore. After
initializing the queue, SVRQUEUE starts a thread to read from the queue,
prints the contents of the messages read from the queue, and terminates
at the user's request.
CLIQUEUE opens the queue and accesses the shared-memory element buffer
and mutex semaphore, and starts a thread to write to the queue.
CLIQUEUE requests a string of data from the user, allocates a
shared-memory element from the buffer, puts the string in the
shared-memory element, then uses an event semaphore to direct the
thread to write the element to the queue. CLIQUEUE terminates at the
user's request.
TASK:
Use queues to implement intertask communication
CONCEPT/FEATURE:
Illustrate the use of PM, threads and Queues
SAMPLE LOCATION:
Inside the OS/2 Sample Programs folder (which is inside the
VisualAge C++ Samples folder).
Note:This sample is not provided in project form.
SOURCE FILE LOCATION:
X:\ibmcpp\samples\toolkit\os2\queues
where X: is the drive you installed the samples and document component
of VisualAge C++ for OS/2.
HOW TO RUN THE SAMPLE:
-From your OS/2 desktop:
Double-click on the sample's icon.
-From an OS/2 command prompt:
To start a non-WorkPlace Shell sample program from an OS/2 command
prompt, type the name of the executable file and press Enter. If you
have edited source code of a sample program and want to recompile,link,
and run the files, use the NMAKE tool. Your output is the executable
file. For information about the NMAKE utility, see the
OS/2 Tools Reference.
SOFTWARE/HARDWARE PREREQUISITES:
- IBM VisualAge C++
- OS/2 Warp
- IBM or compatible 386 and up.
REQUIRED FILES DESCRIPTION
clientry.ipf Input source for IPF compiler
queues.mak MakeMake generated makefile
cliqglbl.h Global definitions
cliqhelp.c Help manager interface routines
cliqhelp.h
cliqhelp.rc Resource compiler input files
cliqmain.c main() file
cliqmain.h
cliqthrd.c Thread support routines
cliqueue.def link definitions
cliqueue.exe
cliqueue.hlp
cliqueue.ipf Input source for IPF compiler
cliqueue.rc
cliqxtrn.h
dlg.ipf IPF compiler input file
file.ipf
help.ipf
queue.h
queue.ico
readme Description and instructions for sample
svroptn.ipf
svrqglbl.h
svrqhelp.c Help Manager interface routines
svrqhelp.h
svrqhelp.rc
svrqmain.c The main() routine
svrqmain.h
svrqpnt.c Window paint support routines
svrqthrd.c Thread support routines
svrqueue.def link definitions file
svrqueue.exe The executable
svrqueue.hlp Help resource file
svrqueue.ipf
svrqueue.rc
svrqxtrn.h