Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
wpthread.cpp File Reference
#include "precompiled.h"
#include "lib/sysdep/os/win/wposix/wpthread.h"
#include <new>
#include <process.h>
#include "lib/posix/posix_filesystem.h"
#include "lib/sysdep/os/win/wposix/wposix_internal.h"
#include "lib/sysdep/os/win/wposix/wtime.h"
#include "lib/sysdep/os/win/wseh.h"
Include dependency graph for wpthread.cpp:

Classes

struct  FuncAndArg
 

Namespaces

namespace  anonymous_namespace{wpthread.cpp}
 

Functions

HANDLE anonymous_namespace{wpthread.cpp}::HANDLE_from_pthread (pthread_t p)
 
pthread_t anonymous_namespace{wpthread.cpp}::pthread_from_HANDLE (HANDLE h)
 
HANDLE anonymous_namespace{wpthread.cpp}::GenerateCurrentThreadUniqueHandle ()
 
HANDLE anonymous_namespace{wpthread.cpp}::GetCurrentThreadUniqueHandle ()
 
int pthread_equal (pthread_t t1, pthread_t t2)
 
pthread_t pthread_self ()
 
int pthread_getschedparam (pthread_t thread, int *policy, struct sched_param *param)
 
int pthread_setschedparam (pthread_t thread, int policy, const struct sched_param *param)
 
int pthread_key_create (pthread_key_t *key, void(*dtor)(void *))
 
int pthread_key_delete (pthread_key_t key)
 
void * pthread_getspecific (pthread_key_t key)
 
int pthread_setspecific (pthread_key_t key, const void *value)
 
static void call_tls_dtors ()
 
int pthread_mutexattr_init (pthread_mutexattr_t *attr)
 
int pthread_mutexattr_destroy (pthread_mutexattr_t *attr)
 
int pthread_mutexattr_gettype (const pthread_mutexattr_t *attr, int *type)
 
int pthread_mutexattr_settype (pthread_mutexattr_t *attr, int type)
 
static CRITICAL_SECTION * CRITICAL_SECTION_from_pthread_mutex_t (pthread_mutex_t *m)
 
pthread_mutex_t pthread_mutex_initializer ()
 
int pthread_mutex_destroy (pthread_mutex_t *m)
 
int pthread_mutex_init (pthread_mutex_t *m, const pthread_mutexattr_t *)
 
int pthread_mutex_lock (pthread_mutex_t *m)
 
int pthread_mutex_trylock (pthread_mutex_t *m)
 
int pthread_mutex_unlock (pthread_mutex_t *m)
 
int pthread_mutex_timedlock (pthread_mutex_t *m, const struct timespec *abs_timeout)
 
static HANDLE HANDLE_from_sem_t (sem_t *sem)
 
sem_tsem_open (const char *name, int oflag,...)
 
int sem_close (sem_t *sem)
 
int sem_unlink (const char *name)
 
int sem_init (sem_t *sem, int pshared, unsigned value)
 
int sem_destroy (sem_t *sem)
 
int sem_post (sem_t *sem)
 
int sem_wait (sem_t *sem)
 
int sem_msgwait_np (sem_t *sem)
 
static unsigned __stdcall thread_start (void *param)
 
int pthread_create (pthread_t *thread_id, const void *attr, void *(*func)(void *), void *arg)
 
int pthread_cancel (pthread_t thread)
 
int pthread_join (pthread_t thread, void **value_ptr)
 

Variables

static const size_t TLS_LIMIT = 64
 
static const size_t MAX_DTORS = 4
 
struct {
using dtortype = void(*)(void *)
 
   pthread_key_t   key
 
   std::atomic< dtortype >   dtor { nullptr }
 
dtors [MAX_DTORS]
 

Function Documentation

◆ call_tls_dtors()

static void call_tls_dtors ( )
static

◆ CRITICAL_SECTION_from_pthread_mutex_t()

static CRITICAL_SECTION * CRITICAL_SECTION_from_pthread_mutex_t ( pthread_mutex_t m)
static

◆ HANDLE_from_sem_t()

static HANDLE HANDLE_from_sem_t ( sem_t sem)
static

◆ pthread_cancel()

int pthread_cancel ( pthread_t  thread)

◆ pthread_create()

int pthread_create ( pthread_t thread_id,
const void *  attr,
void *(*)(void *)  func,
void *  arg 
)

◆ pthread_equal()

int pthread_equal ( pthread_t  t1,
pthread_t  t2 
)

◆ pthread_getschedparam()

int pthread_getschedparam ( pthread_t  thread,
int *  policy,
struct sched_param param 
)

◆ pthread_getspecific()

void * pthread_getspecific ( pthread_key_t  key)

◆ pthread_join()

int pthread_join ( pthread_t  thread,
void **  value_ptr 
)

◆ pthread_key_create()

int pthread_key_create ( pthread_key_t key,
void(*)(void *)  dtor 
)

◆ pthread_key_delete()

int pthread_key_delete ( pthread_key_t  key)

◆ pthread_mutex_destroy()

int pthread_mutex_destroy ( pthread_mutex_t m)

◆ pthread_mutex_init()

int pthread_mutex_init ( pthread_mutex_t m,
const pthread_mutexattr_t  
)

◆ pthread_mutex_initializer()

pthread_mutex_t pthread_mutex_initializer ( )

◆ pthread_mutex_lock()

int pthread_mutex_lock ( pthread_mutex_t m)

◆ pthread_mutex_timedlock()

int pthread_mutex_timedlock ( pthread_mutex_t m,
const struct timespec *  abs_timeout 
)

◆ pthread_mutex_trylock()

int pthread_mutex_trylock ( pthread_mutex_t m)

◆ pthread_mutex_unlock()

int pthread_mutex_unlock ( pthread_mutex_t m)

◆ pthread_mutexattr_destroy()

int pthread_mutexattr_destroy ( pthread_mutexattr_t attr)

◆ pthread_mutexattr_gettype()

int pthread_mutexattr_gettype ( const pthread_mutexattr_t attr,
int *  type 
)

◆ pthread_mutexattr_init()

int pthread_mutexattr_init ( pthread_mutexattr_t attr)

◆ pthread_mutexattr_settype()

int pthread_mutexattr_settype ( pthread_mutexattr_t attr,
int  type 
)

◆ pthread_self()

pthread_t pthread_self ( )

◆ pthread_setschedparam()

int pthread_setschedparam ( pthread_t  thread,
int  policy,
const struct sched_param param 
)

◆ pthread_setspecific()

int pthread_setspecific ( pthread_key_t  key,
const void *  value 
)

◆ sem_close()

int sem_close ( sem_t sem)

◆ sem_destroy()

int sem_destroy ( sem_t sem)

◆ sem_init()

int sem_init ( sem_t sem,
int  pshared,
unsigned  value 
)

◆ sem_msgwait_np()

int sem_msgwait_np ( sem_t sem)

◆ sem_open()

sem_t * sem_open ( const char *  name,
int  oflag,
  ... 
)

◆ sem_post()

int sem_post ( sem_t sem)

◆ sem_unlink()

int sem_unlink ( const char *  name)

◆ sem_wait()

int sem_wait ( sem_t sem)

◆ thread_start()

static unsigned __stdcall thread_start ( void *  param)
static

Variable Documentation

◆ dtor

std::atomic<dtortype> dtor { nullptr }

◆ 

struct { ... } dtors[MAX_DTORS]

◆ key

◆ MAX_DTORS

const size_t MAX_DTORS = 4
static

◆ TLS_LIMIT

const size_t TLS_LIMIT = 64
static