From: cerr on
Hi There,

On our box, two indipendent processes can access /dev/ttyACM0 and i
was wondering how linux manages if multiple processes access the same
ressource at the same time. Can we make sure that messages get
delivered in one go or may they get chopped up and we need to put some
kind of thread safty in there?

Thanks,
Ron
From: Jasen Betts on
On 2010-03-30, cerr <ron.eggler(a)gmail.com> wrote:
> Hi There,
>
> On our box, two indipendent processes can access /dev/ttyACM0 and i
> was wondering how linux manages if multiple processes access the same
> ressource at the same time. Can we make sure that messages get
> delivered in one go or may they get chopped up and we need to put some
> kind of thread safty in there?
>
> Thanks,
> Ron

Last time I opened the same serial port from two different devices the
reading processes got fragmentary messages, but thw writes were short
enough to be atomic.

there is some sort of locking you can do to request exclusive access
to the port.


--- news://freenews.netfront.net/ - complaints: news(a)netfront.net ---