PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
pthread-win32.c File Reference
#include "postgres_fe.h"
#include <windows.h>
#include "pthread-win32.h"
Include dependency graph for pthread-win32.c:

Go to the source code of this file.

Functions

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

Function Documentation

void* pthread_getspecific ( pthread_key_t  key)

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

References NULL.

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

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

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

References malloc.

Referenced by default_threadlock(), and pgtls_init().

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

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

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

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

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

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

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

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

20 {
21  return GetCurrentThreadId();
22 }
void pthread_setspecific ( pthread_key_t  key,
void *  val 
)

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

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

26 {
27 }