Shared Object

bridged with qnx.bsp
Post Reply
sh263

Shared Object

Post by sh263 » Wed May 24, 2006 11:58 am

Hey,

is it possible to communicate between several processes with a shared
object? I tryed this:

# Lib with the same data segment
[gid=0 uid=0 perms=777 data=uip code=uip type=file]
/usr/lib/libbib.so = Content/usr/lib/libbib.so

Tha data segment is shared. In the lib is a global Variable. I write a
value with one process in the global Variable and read the global
Variable with another process. The value is not the same. Can you
tell me weather this is possible or not?

Regards, Stephan

Malte Mundt

Re: Shared Object

Post by Malte Mundt » Wed May 24, 2006 2:10 pm

I don't think you can do it this way. For libs, I believe threads use
something called 'thread local storage'.

It's much easier to use a shared memory object, from which both processes
can read.

Cheers,


Malte

"sh263" <stephan.huels@gmx-dot-de.no-spam.invalid> schrieb im Newsbeitrag
news:e51hpj$d06$1@inn.qnx.com...
Hey,

is it possible to communicate between several processes with a shared
object? I tryed this:

# Lib with the same data segment
[gid=0 uid=0 perms=777 data=uip code=uip type=file]
/usr/lib/libbib.so = Content/usr/lib/libbib.so

Tha data segment is shared. In the lib is a global Variable. I write a
value with one process in the global Variable and read the global
Variable with another process. The value is not the same. Can you
tell me weather this is possible or not?

Regards, Stephan

sh263

RE: Re: Shared Object

Post by sh263 » Mon May 29, 2006 7:58 am

thanks for your answer. I will use a shared memory object.

Post Reply

Return to “qnx.bsp”