X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=platform%2Fwin32%2Finternals%2F_PDCLIB_threadconfig.h;h=097942de45589f2c1234a4d026ef851f42fe3e39;hp=0f35d294f94e54632cb6235785fa54b81ea75a6f;hb=abc15df6b9fae3374d24c7cf5c3ab94c605b2a6d;hpb=01084b6a95bd991aa227977e96c9aa1b8e08ef85 diff --git a/platform/win32/internals/_PDCLIB_threadconfig.h b/platform/win32/internals/_PDCLIB_threadconfig.h index 0f35d29..097942d 100644 --- a/platform/win32/internals/_PDCLIB_threadconfig.h +++ b/platform/win32/internals/_PDCLIB_threadconfig.h @@ -1,36 +1,40 @@ -#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 long _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 +#ifndef _PDCLIB_THREADCONFIG_H +#define _PDCLIB_THREADCONFIG_H +#include "_PDCLIB_aux.h" +#include "_PDCLIB_int.h" + +#ifdef __cplusplus +extern "C" { +#endif +#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 long _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; +}; + +#ifdef __cplusplus +} +#endif +#endif