IPC System Sources ================== This directory contains the C source files for all the current system modules of IPC. Include header files: IPC.h -- contains definitions for all standard IPC functions. Should be included in any source that uses IPC. IPCPorts.h -- Port structure and flags. Should only be needed in special cases: normally all access to IPCPorts should be via the procedures in IPC.c (and perhaps LoadIPCPort.c) -- IPCPorts are then just defined for the user as standard MsgPorts. If needed, IPCPorts.h should precede IPC.h. Source Files: IPC.c -- Contains all the basic IPC procedures that a user program will call for managing IPCPorts and IPCMessages. The object file generated from this source by your compiler should be linked between your user program and the C libraries. LoadIPCPort.c -- An alternative to GetIPCPort (which it uses internally) that sends a message to a "Port Broker" if the requested port does not currently have a server; if the broker cannot find a server to satisfy the request, this call will return NULL. If used, link this module's object file before IPC itself. Broker.c -- A skeletal Port Broker. This is just a demonstration of how a broker will accept messages and reply to them; it does nothing about actually trying to locate a server -- just posts a courteous request to the user in its console window... It is written so that it should be easy to plug in a proper loading procedure. Comments are sparse [apologies!] but the code is probably compact enough to be followed fairly easily. Link File: Broker.lnk -- A BLink "WITH" file to create an exectuable version of the broker. +++++++++++++++++ Compatibility: The header files and IPC.c should be totally compatible with both Lattice and Manx/Aztec [with thanks to Brian Witt for the conversion!]. I think LoadIPCPort probably is, but will make no guarantees (it DOES work with Lattice!); the Broker code will probably need some tweaking to work with Manx. Of COURSE there should be no problems in sending IPCMessages between modules compiled under different regimes! Compiling under Lattice: Any compiler switches you use are optional, but I normally compile with the -v switch to suppress stack checking, and use the default addressing mode (Base Register Relative in 4.0+). If you are going to call this code from a child task of the main program, you MUST of course use -v, and you will normally need -y as well (see the Lattice manual). +++++++++++++++++ -----------------