public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
* Static libraries initialization
@ 2008-04-24 12:53 Ramiro Polla
       [not found] ` <4810ABB9.10106@homemail.com.au>
  0 siblings, 1 reply; 4+ messages in thread
From: Ramiro Polla @ 2008-04-24 12:53 UTC (permalink / raw)
  To: pthreads-win32

Hello,

pthreads-win32 requires programs that use the library statically to call 
some (de)initialization code, which would be the same code called by 
DllMain(). There are plenty of messages regarding this on the mailinglist.

This makes the library not very developer friendly. It causes code 
duplication for every program that wants to use the library statically, 
#ifdef mess and harder configuration checks.

1- Why isn't this initialization done by pthreads-win32 itself? All
    pthread_* functions could have an if(!initialized) {...} block before
    running any code that depends on it.
2- Static pthreads-win32 libraries should at least check if they were
    properly initialized before allowing pthread_* functions to run.
    Returning an error is far better than having the program crash.

Ramiro Polla

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-05-19 11:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-24 12:53 Static libraries initialization Ramiro Polla
     [not found] ` <4810ABB9.10106@homemail.com.au>
     [not found]   ` <4810D5C3.2070306@lisha.ufsc.br>
2008-04-25  5:01     ` Ross Johnson
2008-04-26  0:07       ` Ross Johnson
2008-05-19 11:29       ` Roland Schwarz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).