Boost logo

Boost :

Subject: Re: [boost] [interprocess] Ticket 9414 (32 process communicating with 64 process)
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2014-06-20 05:46:53

El 19/06/2014 16:20, Andrey Semashev escribió:
> On Thu, Jun 19, 2014 at 12:56 AM, Ion Gaztañaga <igaztanaga_at_[hidden]> wrote:
>> The problem with the message queue is that it won't work at all in Linux
>> between 32 and 64 bit processes because this message queue is based on
>> process-shared mutex and condition variables and pthread mutex and condition
>> variables provided by glibc are not compatible between 32 and 64 bit
>> processes.
> Interesting. Do you think it is possible to use futexes directly to
> implement this portability? This would be a Linux-specific solution,
> of course.

Futexes take a int pointer and in Linux int is 32 bits in both 32 and 64
bit processes (I think it uses the LP64 data model). So yes, that would
be possible, but quite hard to implement, as futexes are quite tricky. I
would accept patches, though ;-)

We can also test if using spin_condition/spin_mutex is enough from a
performance point of view. Those are implemented with basic atomic
operations and waits, but operating in 32 bit integers. That could be
portable in all OS if correct alignments are used.



Boost list run by bdawes at, gregod at, cpdaniel at, john at