home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!wupost!csus.edu!netcom.com!netcomsv!terapin!paulk
- From: paulk@terapin.com (Paul Kienitz)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: IPC and shared memory
- References: <Jean-Guy_Speton.056u@tvbbs.wimsey.bc.ca>
- Message-ID: <paulk.317w@terapin.com>
- Date: 31 Dec 92 20:16:40 PST
- Organization: BBS
- Lines: 21
-
- > I am looking for information on inter-process communications (IPC)
- > and shared memory functions. Do the Amiga libraries have any
- > functions along these lines?
-
- Sure, there's PutMsg() eh.
-
- > The reason I'm asking is I intend on writing a multi-line door, but
- > have questions as to how the different processes of the door will
- > communicate with one another. I have a few ideas in mind, but they
- > all seem as if they will become extremely slow and inefficient with
- > more than a few lines.
-
- Last time I messed around with a multiplayer game on a mainframe, the
- way it was done, which worked pretty well, was to have an area of
- memory that all the processes knew about, accessed through a locking
- mechanism to protect crucial sections of code. The way to do this
- under AmigaDOS is with a named SignalSemaphore. Tasks can arbitrate
- access to the data by taking locks on the semaphore, and the process
- of finding the semaphore by name allows the different tasks to all
- get pointers to the same piece of memory, which the semaphore happens
- to be the first item in.
-