Re: [PATCHES] Compiling libpq with VisualC

Andreas Pflug <[email protected]>
Newsgroups gmane.comp.db.postgresql.devel.win32,gmane.comp.db.postgresql.devel.general
Message-ID <[email protected]>
Bruce Momjian wrote:

>
>What is the recommended way to create mutex objects (CreateMutex) from
>Win32 libraries?  There must be a clean way like there is in pthreads.
>

It's having a central one-time called routine executing CreateMutex. 
This can be DllMain, *if* used as DLL, but that's certainly no solution 
for static linkage. This would require some PQinitThreadStuff() routine, 
which may be called only once (and ultimately can't check for that 
itself, if you don't trust a static var).

Regards,
Andreas



---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [email protected] so that your
      message can get through to the mailing list cleanly
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.