OpenQNX :: The QNX Community Portal

Jul 25, 2008 - 04:22 PM
Google
  Web openqnx.com   
     Create an account Home · Submit News · QNX Forums · QNX Download · Search   
_
Main Menu
Who's Online
There are 24 unlogged users and 1 registered user online.

You can log-in or register for a user account here.

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
sh263
Post subject: Shared Object  PostPosted: May 24, 2006 - 11:19 AM
Active Member


Joined: Jan 12, 2005
Posts: 26
Location: Munich Germany
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
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Thunderblade
Post subject: Re: Shared Object  PostPosted: May 24, 2006 - 02:10 PM
Senior Member


Joined: Apr 07, 2005
Posts: 259

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...
Quote:
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
 
 View user's profile Send private message  
Reply with quote Back to top
sh263
Post subject: RE: Re: Shared Object  PostPosted: May 29, 2006 - 06:33 AM
Active Member


Joined: Jan 12, 2005
Posts: 26
Location: Munich Germany
thanks for your answer. I will use a shared memory object.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
All logos and trademarks in this site are property of their respective owners. The comments are property of their posters.
Powered by OpenQNX: The QNX Community Portal Site
QNX and the QNX logo are registered trademarks of QNX Software Systems.