• Bruce Momjian's avatar
    win32 doesn't support a static initializer for mutexes, thus the first · a41463e3
    Bruce Momjian authored
    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
    a41463e3
fe-connect.c 74.6 KB