Re: [HACKERS] [PATCHES] Compiling libpq with VisualC

2004-06-14 Thread Magnus Hagander
> >>What is the recommended way to create mutex objects > (CreateMutex) from > >>Win32 libraries? There must be a clean way like there is > in pthreads. > >> > >> > > > >A mutex is inherently a global object. CreateMutex(NULL, > FALSE, NULL) > >will return a handle to an unowned mutex. > >

Re: [HACKERS] [PATCHES] Compiling libpq with VisualC

2004-06-13 Thread Manfred Spraul
[EMAIL PROTECTED] 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. A mutex is inherently a global object. CreateMutex(NULL, FALSE, NULL) will return a handle to an unowned mutex. That's not t

Re: [pgsql-hackers-win32] [HACKERS] [PATCHES] Compiling libpq with VisualC

2004-06-13 Thread Bruce Momjian
[EMAIL PROTECTED] wrote: > > > > [ Thread moved to hackers and win32.] > > > > Andreas Pflug wrote: > >> Bruce Momjian wrote: > >> > >> > > >> > > >> >Agreed. My pthread book says pthread_mutex_init() should be called > >> only > >> >once, and we have to guarantee that. If the Windows implentatio

Re: [HACKERS] [PATCHES] Compiling libpq with VisualC

2004-06-13 Thread pgsql
> > [ Thread moved to hackers and win32.] > > Andreas Pflug wrote: >> Bruce Momjian wrote: >> >> > >> > >> >Agreed. My pthread book says pthread_mutex_init() should be called >> only >> >once, and we have to guarantee that. If the Windows implentation >> allows >> >it to be called multiple times,

Re: [HACKERS] [PATCHES] Compiling libpq with VisualC

2004-06-11 Thread Bruce Momjian
[ Thread moved to hackers and win32.] Andreas Pflug wrote: > Bruce Momjian wrote: > > > > > > >Agreed. My pthread book says pthread_mutex_init() should be called only > >once, and we have to guarantee that. If the Windows implentation allows > >it to be called multiple times, just create a fun