Re: Transfer data between processes



Henk van Winkoop wrote:
I think, thats why mutexes were invented to synchronize processes that
cannot be synchronised by using variables due to this interrupt-trickyness.
But I still do not like my AP being slowed down.

So the principal problem is: how to transport data between a master-process
and a slave-processes without delaying the master-process.

How or what should I use to solve this problem? I thought a lot about it but
still cannot find a reliable method.

When synchronization is required then it inherently must delay one process to avoid accessing invalid data. There are efficient methods (such as the InterlockedIncrement API) to prevent interruption of an index update, but they really do the same thing as a mutex: delay one process when necessary to assure data integrity.

In the case you described (a 2400 baud ring buffer) the synchronization delay should be unnoticable. A synchronized increment is far faster than your data rate.

--
Scott McPhillips [VC++ MVP]

.