X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=platform%2Fwin32%2Finternals%2F_PDCLIB_threadconfig.h;fp=platform%2Fwin32%2Finternals%2F_PDCLIB_threadconfig.h;h=d914ae04d646564db18632f49c62f6b201610a63;hp=0000000000000000000000000000000000000000;hb=639bad513ab9399ed9a8c588a476a10dbe6c9478;hpb=008908f7a61acf9df1248c005378a3c4b4393547 diff --git a/platform/win32/internals/_PDCLIB_threadconfig.h b/platform/win32/internals/_PDCLIB_threadconfig.h new file mode 100644 index 0000000..d914ae0 --- /dev/null +++ b/platform/win32/internals/_PDCLIB_threadconfig.h @@ -0,0 +1,37 @@ +#ifndef _PDCLIB_THREADCONFIG_H +#define _PDCLIB_THREADCONFIG_H +#include <_PDCLIB_aux.h> +#include <_PDCLIB_int.h> + +_PDCLIB_BEGIN_EXTERN_C +#define _PDCLIB_TSS_DTOR_ITERATIONS 3 +#define _PDCLIB_ONCE_FLAG_INIT { -1, 0 } +#define _PDCLIB_ONCE_FLAG_IS_DONE( _f ) ((_f)->_State == 0) +typedef struct { + long _State; + void *_Handle; +} _PDCLIB_once_flag; + +void _PDCLIB_call_once(_PDCLIB_once_flag *flag, void (*func)(void)); + +//#define _PDCLIB_THRD_HAVE_MISC +//#define _PDCLIB_CND_T char +#define _PDCLIB_MTX_T struct _PDCLIB_mtx + +struct _PDCLIB_mtx { + void * _WaitEvHandle; + volatile signed long _State; + volatile unsigned int _ThreadId; + volatile unsigned int _NestCount; +}; + +#define _PDCLIB_TSS_T struct _PDCLIB_tss * + +struct _PDCLIB_tss { + void (*_Destructor)(void*); + struct _PDCLIB_tss * _Next; + unsigned int _Key; +}; + +_PDCLIB_END_EXTERN_C +#endif