Skip site navigation (1) Skip section navigation (2)

pgsql-server: > win32 doesn't support a static initializer for mutexes,

From: momjian(at)svr1(dot)postgresql(dot)org (Bruce Momjian)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql-server: > win32 doesn't support a static initializer for mutexes,
Date: 2004-07-12 14:23:28
Message-ID: 20040712142328.A3F96D1B1F8@svr1.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
> win32 doesn't support a static initializer for mutexes, thus the first
> user must initialize the lock. The problem are concurrent "first" users
> - the pthread_mutex_t initialization must be synchronized.
> The current implementation is broken, the attached patches fixes that:
> mutex_initlock is a spinlock. If the pthread_mutex_t mutex is not
> initialized, then the spinlock is acquired, if the pthread_mutex_t is
> initialized if it's not yet initialized and then the spinlock is dropped.

Manfred Spraul

Modified Files:
--------------
    pgsql-server/src/interfaces/libpq:
        fe-connect.c (r1.277 -> r1.278)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/interfaces/libpq/fe-connect.c.diff?r1=1.277&r2=1.278)
        fe-secure.c (r1.44 -> r1.45)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/interfaces/libpq/fe-secure.c.diff?r1=1.44&r2=1.45)

pgsql-committers by date

Next:From: Bruce MomjianDate: 2004-07-12 14:31:05
Subject: pgsql-server: The attached patch, which incorporates the previous one
Previous:From: Bruce MomjianDate: 2004-07-12 14:16:29
Subject: pgsql-server: Back out thread fix until I get clarification.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group