1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

Pgindent run for 8.0.

This commit is contained in:
Bruce Momjian
2004-08-29 05:07:03 +00:00
parent 90cb9c3051
commit b6b71b85bc
527 changed files with 20550 additions and 18283 deletions

View File

@ -1,4 +1,4 @@
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.22 2004/06/10 22:26:21 momjian Exp $ */
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.23 2004/08/29 05:06:59 momjian Exp $ */
#define POSTGRES_ECPG_INTERNAL
#include "postgres_fe.h"
@ -14,8 +14,9 @@
#ifdef ENABLE_THREAD_SAFETY
static pthread_mutex_t connections_mutex = PTHREAD_MUTEX_INITIALIZER;
static pthread_key_t actual_connection_key;
static pthread_key_t actual_connection_key;
static pthread_once_t actual_connection_key_once = PTHREAD_ONCE_INIT;
#else
static struct connection *actual_connection = NULL;
#endif
@ -25,7 +26,7 @@ static struct connection *all_connections = NULL;
static void
ecpg_actual_connection_init(void)
{
pthread_key_create(&actual_connection_key, NULL);
pthread_key_create(&actual_connection_key, NULL);
}
#endif
@ -114,8 +115,8 @@ ecpg_finish(struct connection * act)
}
#ifdef ENABLE_THREAD_SAFETY
if( pthread_getspecific(actual_connection_key) == act )
pthread_setspecific(actual_connection_key, all_connections);
if (pthread_getspecific(actual_connection_key) == act)
pthread_setspecific(actual_connection_key, all_connections);
#else
if (actual_connection == act)
actual_connection = all_connections;