Skip navigation.
Home
The QNX Community Portal

View topic - Shared Object

Shared Object

Read-only archive of qnx.bsp (Discuss building an image, flashing a board or using a BSP) at inn.qnx.com

Shared Object

Postby sh263 » Wed May 24, 2006 11:19 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
sh263
Active Member
 
Posts: 26
Joined: Wed Jan 12, 2005 2:53 pm
Location: Munich Germany

Re: Shared Object

Postby Thunderblade » 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
Thunderblade
Senior Member
 
Posts: 487
Joined: Thu Apr 07, 2005 11:52 am

RE: Re: Shared Object

Postby sh263 » Mon May 29, 2006 6:33 am

thanks for your answer. I will use a shared memory object.
sh263
Active Member
 
Posts: 26
Joined: Wed Jan 12, 2005 2:53 pm
Location: Munich Germany


Return to qnx.bsp

Who is online

Users browsing this forum: No registered users and 2 guests

cron