PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
pthread-win32.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef ULONG pthread_key_t
 
typedef CRITICAL_SECTION * pthread_mutex_t
 
typedef int pthread_once_t
 

Functions

DWORD pthread_self (void)
 
void pthread_setspecific (pthread_key_t, void *)
 
void * pthread_getspecific (pthread_key_t)
 
int pthread_mutex_init (pthread_mutex_t *, void *attr)
 
int pthread_mutex_lock (pthread_mutex_t *)
 
int pthread_mutex_unlock (pthread_mutex_t *)
 

Typedef Documentation

Definition at line 7 of file pthread-win32.h.

typedef CRITICAL_SECTION* pthread_mutex_t

Definition at line 8 of file pthread-win32.h.

Definition at line 9 of file pthread-win32.h.

Function Documentation

void* pthread_getspecific ( pthread_key_t  )

Definition at line 29 of file pthread-win32.c.

References NULL.

Referenced by ecpg_finish(), ecpg_get_connection(), ecpg_get_connection_nr(), and ECPGget_sqlca().

30 {
31  return NULL;
32 }
#define NULL
Definition: c.h:229
int pthread_mutex_init ( pthread_mutex_t ,
void *  attr 
)

Definition at line 35 of file pthread-win32.c.

References malloc.

Referenced by default_threadlock(), and pgtls_init().

36 {
37  *mp = (CRITICAL_SECTION *) malloc(sizeof(CRITICAL_SECTION));
38  if (!*mp)
39  return 1;
40  InitializeCriticalSection(*mp);
41  return 0;
42 }
#define malloc(a)
Definition: header.h:50
int pthread_mutex_lock ( pthread_mutex_t )

Definition at line 45 of file pthread-win32.c.

Referenced by default_threadlock(), destroy_ssl_system(), ecpg_get_connection(), ecpg_log(), ECPGconnect(), ECPGdebug(), ECPGdisconnect(), and pgtls_init().

46 {
47  if (!*mp)
48  return 1;
49  EnterCriticalSection(*mp);
50  return 0;
51 }
int pthread_mutex_unlock ( pthread_mutex_t )

Definition at line 54 of file pthread-win32.c.

Referenced by default_threadlock(), destroy_ssl_system(), ecpg_get_connection(), ecpg_log(), ECPGconnect(), ECPGdebug(), ECPGdisconnect(), and pgtls_init().

55 {
56  if (!*mp)
57  return 1;
58  LeaveCriticalSection(*mp);
59  return 0;
60 }
DWORD pthread_self ( void  )

Definition at line 18 of file pthread-win32.c.

19 {
20  return GetCurrentThreadId();
21 }
void pthread_setspecific ( pthread_key_t  ,
void *   
)

Definition at line 24 of file pthread-win32.c.

Referenced by ecpg_finish(), ECPGconnect(), ECPGget_sqlca(), and ECPGsetconn().

25 {
26 }