<libroxml  version="3.0.2" />
contact: tristan.lelong@libroxml.net
roxml_win32_native.h
Go to the documentation of this file.
1 
12 #ifndef ROXML_WIN32_NATIVE_THREAD_H
13 #define ROXML_WIN32_NATIVE_THREAD_H
14 
15 #if defined(_MSC_VER) && _MSC_VER >= 1400
16 #ifndef _CRT_SECURE_NO_DEPRECATE
17 #define _CRT_SECURE_NO_DEPRECATE
18 #endif
19 #pragma warning(disable: 4996)
20 #endif
21 
22 #define WIN32_LEAN_AND_MEAN
23 #include <windows.h>
24 
25 typedef HANDLE pthread_t;
26 typedef CRITICAL_SECTION pthread_mutex_t;
27 
28 #define pthread_self() GetCurrentThread()
29 #define pthread_mutex_init(a, b) InitializeCriticalSection(a)
30 #define pthread_mutex_lock(a) EnterCriticalSection(a)
31 #define pthread_mutex_unlock(a) LeaveCriticalSection(a)
32 #define pthread_mutex_destroy(a) DeleteCriticalSection(a)
33 
34 #endif /* ROXML_WIN32_NATIVE_THREAD_H */