Thread safety confusion Pl help

Thread safety confusion Pl help

Post by Sony Anton » Fri, 16 Mar 2001 10:10:03



Hi :
We have the following confusion. Our design is currently being help up due
to this. So please respond if you happen o know the answer.

We have a main single threaded code with thread unsafe libraries being
linked in. From this code we want to be able to make calls to a third party
library ( Orbix ). But orbix is essentially reentrant code. We know that
Orbix internally have house keeping threads ( though we only make one call
at a time ).
So summarising ...
is there any problem in a single threaded **thread unsafe** code making
calls to **multi threaded** library, if the library internally creates
threads.
Will there be any issues with the same symbols being defined multiply (
single threaded version of the symbol and reentrant version of the same
symbol ) in the resultant binary.
I would like to know about this problem in general and specifically to
Solaris 2.7 ( if possible ).
I know Solaris creates about 3 internal threads if your program is compiled
with ( -mt switch which is required  to compile reentrant code ).
I also tried a simple program with a shared object defining foo() that is
produced with -mt switch and the main() compiled without -mt switch and
linked to teh shared object. And it worked fine. But can I generalise this
result.

Thanks for your help

Sony

 
 
 

1. Thread safety confusion pl help

Hi:
I posted this 2 days back. Then to my surprise when I checked, 2 of the news
servers did not show this which makes me think that there was something wrong
with the newsserver through which I posted. Pl accept my apologies if you
already came across this.
-------------------
Hi :
We have the following confusion. Our design is currently being help up due
to this. So please respond if you happen o know the answer.

We have a main single threaded code with thread unsafe libraries being
linked in. From this code we want to be able to make calls to a third party
library ( Orbix ). But orbix is essentially reentrant code. We know that
Orbix internally have house keeping threads ( though we only make one call
at a time ).
So summarising ...
is there any problem in a single threaded **thread unsafe** code making
calls to **multi threaded** library, if the library internally creates
threads.
Will there be any issues with the same symbols being defined multiply (
single threaded version of the symbol and reentrant version of the same
symbol ) in the resultant binary.
I would like to know about this problem in general and specifically to
Solaris 2.7 ( if possible ).
I know Solaris creates about 3 internal threads if your program is compiled
with ( -mt switch which is required  to compile reentrant code ).
I also tried a simple program with a shared object defining foo() that is
produced with -mt switch and the main() compiled without -mt switch and
linked to teh shared object. And it worked fine. But can I generalise this
result.

Thanks for your help

Sony

 -----  Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web  -----
  http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
   NewsOne.Net prohibits users from posting spam.  If this or other posts

2. help with network support/setup Solaris..

3. Thread safety confusion Pl help

4. kwm -nosession

5. glibc2: reentrancy, thread-safety, signal-safety

6. Hie there, I need some help

7. LinuxThreads and thread-safety, re-entrancy, async-safety!

8. Dell Optiplex & cdda2wav

9. STL thread safety ?

10. Sockets and Thread Safety

11. Linux libraries and thread-safety!!!

12. VisualAge C++, exception handling, and thread safety

13. A question on thread-safety