Inter-process comms - which method?

S

Steve T

Hi,

I am developing some software in C++ to access a PMC card in a PC. The PMC
card comes with a set of C++ libs to access it and to handle interrupts from
it. I am therefore writing entirely in C++ at the application level and have
no access to the device driver for the PMC.

My design involves:
- a single process running on the host machine to handle all DMAs from the
PMC to the host.
- a set of libraries that applications must link with in order access the
DMA data received from the PMC.

The DMAs handled by the single process transfer data for a number of host
application processes that link with my libraries., ie. each block of DMA'd
data is for one application. My DMA process must wake this application and
let it know that data is available for it. These application processes must
block while waiting for data to be made available to them by the DMA
process. I do not want them to have to poll.

My question is this. What is the best way for the DMA thread to communicate
with my library code to inform the application process that data is
available?

The DMA thread will probably also have to tell the application (library
code) where the data is, so more than just a signal is probably required.

(I don't believe actually getting at the DMA data is a problem as I can
implement it in a shared memory block, it's the handshake between the DMA
process and library code that concerns me.)

The final target is a Linux machine but the PMC libs are also available for
Windows which is where I have started to develop it. Ideally I'd like a
solution that fits both but it must work with Linux.

Many thanks in advance.

Steve
 
G

Gianni Mariani

This is off topic for comp.lang.c++.

Steve said:
My question is this. What is the best way for the DMA thread to communicate
with my library code to inform the application process that data is
available?

I would probably use somthing similar to the X server i.e. Unix domain
sockets.
 
S

Steve T

My apologies if this was off-topic. I was hoping there was perhaps a C++
specific wrapper or library to handle this.

Perhaps someone could recommend a better group then...?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top