Path: utzoo!attcan!uunet!husc6!bbn!mailrus!b-tech!zeeff From: zeeff@b-tech.ann-arbor.mi.us (Jon Zeeff) Newsgroups: comp.unix.xenix Subject: Re: Shared Memory Problem Message-ID: <4918@b-tech.ann-arbor.mi.us> Date: 5 Nov 88 17:13:44 GMT References: <3246@ucdavis.ucdavis.edu> Reply-To: zeeff@b-tech.ann-arbor.mi.us (Jon Zeeff) Organization: Branch Technology Ann Arbor, MI Lines: 23 In article <3246@ucdavis.ucdavis.edu> tuck@iris.ucdavis.edu (Devon Tuck) writes: >in FORTRAN, to our Xenix 386/20 system. It is necessary for at least 3 >different programs to have access to an input buffer which is constantly >being filled. >The closest solution I have found, is to create a host subroutine which >passes the buffer array of a program into shared memory, loads it with the >new information, and then returns it. The problem with this is, the loop >which checks for this new information will most probably be an infinite >loop, If I understand your situation correctly, you want several programs to wait on an update of a shared memory segment without sitting in an polling loop. One way to do this would be to create a fifo (with mknod(1)) for each process and write a byte to each of them when you update the segment. The other processes can do a blocking read on the fifo. This is just the first thing that came to mind - there are probably other ways to do this. -- Jon Zeeff Ann Arbor, MI umix!b-tech!zeeff zeeff@b-tech.ann-arbor.mi.us