Header And Logo

PostgreSQL
| The world's most advanced open source database.

Typedefs | Functions

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

typedef ULONG pthread_key_t

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

typedef CRITICAL_SECTION* pthread_mutex_t

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

typedef int pthread_once_t

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


Function Documentation

void* pthread_getspecific ( pthread_key_t   ) 

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

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

{
    return NULL;
}

int pthread_mutex_init ( pthread_mutex_t ,
void *  attr 
)

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

References malloc.

Referenced by default_threadlock().

{
    *mp = (CRITICAL_SECTION *) malloc(sizeof(CRITICAL_SECTION));
    if (!*mp)
        return 1;
    InitializeCriticalSection(*mp);
    return 0;
}

int pthread_mutex_lock ( pthread_mutex_t  ) 

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

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

{
    if (!*mp)
        return 1;
    EnterCriticalSection(*mp);
    return 0;
}

int pthread_mutex_unlock ( pthread_mutex_t  ) 

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

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

{
    if (!*mp)
        return 1;
    LeaveCriticalSection(*mp);
    return 0;
}

DWORD pthread_self ( void   ) 

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

{
    return GetCurrentThreadId();
}

void pthread_setspecific ( pthread_key_t  ,
void *   
)

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

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

{
}