This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

pthread and shared C++ libs ?


Dear Experts,

   in an environment with several shared libraries (on Linux,
using gcc-2.95.2, all in C++) applications sometimes are deadlocked 
in __pthread_lock (from __pthread_mutex_lock) or segfault in
pthread_mutex_lock ...

   After searching the web and your mailing lists and FAQs for quite
a while, I've only found two references to vaguely similar problems,
both without an answer, at:
http://bugs.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=1943&database=default
http://bugs.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=1646&database=default

   Is there anywhere a descripton on how to use the (undocumented ??) 
"-pthread" flag or which combination of C_FLAGS (-D_REENTRANT any 
other ?) and linker options (?) and libs (is there a dependency on 
the order of lpthread, lstdc++, ldl ?) one has to use to build shared 
libraries which may be dynamically loaded at runtime in a multithreaded 
application (anything special for the application)?

Any hint would be appreciated ...

		cheers,   andreas

-- 
 ---------------------------------------------------------------
| Andreas Pfeiffer, CERN IT/ASD, CH-1211 Geneve 23, Switzerland |
| GSM    : +41-79-201-4180    e-mail : Andreas.Pfeiffer@cern.ch |
| phone  : +41-22-76-75029             fax    : +41-22-76-78630 |
 ---------------------------------------------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]