Martin Nylund <firstname.lastname@example.org> wrote:
What’s wrong with the Posix method? If you want to use shared memory you can
read the shared memory handle using the ‘Posix method’ i.e.
read(my_isa_fd, &shmem_ptr, sizeof(shmem_ptr));
It’s kinda / sorta a kludge; you’re not really reading “consecutive data”
as the “read()” interface suggests. However, that said, “do whatever you
think you can get away with in a design review”
I’d go for a devctl() that sez “Acquire data, return index into shmem”
Chapter “Leaving the client blocked, replying later” shows how to implement
the blocking on the resource manager side.
“jinma” <> email@example.com> > schrieb im Newsbeitrag
news:d0ledc$ct2$> firstname.lastname@example.org> …
Hi, I am trying to build a resource manager which interacts with the
clients with following manner.
- clients can send commands to resourse manager asking it to read
data from ISA device. clients is then blocked
- resource manager will then get bunch of data from the ISA device
but will not send the data to the client. Instead, it will write to
the shared memory and will acknowledge the client with the location
of the data in the shared memory.
- client will be unblocked and will start reading from the shared
memory location that the resource manager has given to the client.
As you can see client doesn’t need to use the normal POSIX method to
communicate with the resource manager (ie read(), write(), etc…).
Then what is the best communication method to implement this in
[If replying via email, you’ll need to click on the URL that’s emailed to you
afterwards to forward the email to me – spam filters and all that]
Robert Krten, PDP minicomputer collector http://www.parse.com/~museum/