From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,fea4b5bf798159bd X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2002-12-09 05:30:59 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeed.berkeley.edu!news-hog.berkeley.edu!ucberkeley!nntp-relay.ihug.net!ihug.co.nz!news.compaq.com!news.cpqcorp.net!53ab2750!not-for-mail From: David Butenhof Subject: Re: dlopen and threaded libraries Newsgroups: comp.unix.tru64 References: <194637fd.0212051024.7129e9f0@posting.google.com> User-Agent: KNode/0.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit Message-ID: Date: Mon, 09 Dec 2002 08:45:51 -0500 NNTP-Posting-Host: 16.31.48.112 X-Complaints-To: abuse@Compaq.com X-Trace: news.cpqcorp.net 1039440756 16.31.48.112 (Mon, 09 Dec 2002 05:32:36 PST) NNTP-Posting-Date: Mon, 09 Dec 2002 05:32:36 PST Organization: Hewlett-Packard Company Xref: archiver1.google.com comp.unix.tru64:9224 Paul Pluzhnikov wrote: > David Butenhof writes: > >> Paul Pluzhnikov wrote: >> > AFAIK, AIX is the only UNIX system that supports non-threaded exe >> > suddenly becoming multi-threaded. >> >> Really? Are you sure about that? > > Perhaps I am reading more than what is written? > http://www-1.ibm.com/servers/esdd/pdfs/aix_ll.pdf (page 23): > > With the introduction of AIX 4.3, all system libraries are now > inherently thread-enabled. libc contains a mechanism whereby > it can detect whether the pthreads environment must be enabled, > and will perform all initialization required to support pthreads > at program start-up, as well as at the time that libpthreads > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > is introduced into a running process via dynamic loading. This > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > means that a program can be constructed in a manner that does not > take advantage of threads, but may become a threaded program due > to a module dependency hierarchy that incorporates the pthreads > library. It is advantageous to consider support for threads when > an application is built. Well. Interesting. That certainly sounds pretty unambiguous. On the other hand, that is all essentially what we tried to do. The problem is that while the system libraries (e.g., libc) are all "thread enabled", some (e.g. libc ;-) ) are not capable of REEVALUATING that decision once it's been made. There's nothing in the AIX documentation extract you've shown that actually SAYS anything different. (Though it clearly IMPLIES that it ought to be able to reevaluate dynamically.) Still, someone in AIX clearly wanted to try and thought it was useful. Which I suppose means nothing more than that it wasn't designed by the same people who were arguing in The Open Group. ;-) -- /--------------------[ David.Butenhof@hp.com ]--------------------\ | Hewlett-Packard Company Tru64 UNIX & VMS Thread Architect | | My book: http://www.awl.com/cseng/titles/0-201-63392-2/ | \----[ http://homepage.mac.com/dbutenhof/Threads/Threads.html ]---/