mirror of
https://github.com/boostorg/detail.git
synced 2025-07-31 21:04:27 +02:00
Fixed WinAPI compilation. Ported timed mutex to waitable timer. Windows time points are now aligned with FILETIME to reduce conversion overhead when used with waitable timers.
[SVN r86192]
This commit is contained in:
@@ -101,7 +101,7 @@ extern "C" {
|
||||
# ifdef _WIN64
|
||||
#if defined(__CYGWIN__)
|
||||
typedef long INT_PTR_;
|
||||
typedef unsigned long INT_PTR_;
|
||||
typedef unsigned long UINT_PTR_;
|
||||
typedef long LONG_PTR_;
|
||||
typedef unsigned long ULONG_PTR_;
|
||||
#else
|
||||
@@ -112,7 +112,7 @@ extern "C" {
|
||||
#endif
|
||||
# else
|
||||
typedef int INT_PTR_;
|
||||
typedef unsigned int INT_PTR_;
|
||||
typedef unsigned int UINT_PTR_;
|
||||
typedef long LONG_PTR_;
|
||||
typedef unsigned long ULONG_PTR_;
|
||||
# endif
|
||||
|
@@ -27,26 +27,47 @@ namespace winapi
|
||||
typedef ::NEARPROC NEARPROC_;
|
||||
typedef ::PROC PROC_;
|
||||
|
||||
using ::LoadLibrary;
|
||||
# ifdef BOOST_NO_ANSI_APIS
|
||||
using ::LoadLibraryW;
|
||||
using ::GetModuleHandleW;
|
||||
# else
|
||||
using ::LoadLibraryA;
|
||||
using ::GetModuleHandleA;
|
||||
# endif
|
||||
using ::FreeLibrary;
|
||||
using ::GetProcAddress;
|
||||
using ::GetModuleHandleA;
|
||||
#else
|
||||
extern "C" {
|
||||
#ifdef _WIN64
|
||||
# ifdef _WIN64
|
||||
typedef INT_PTR (WINAPI *FARPROC_)();
|
||||
typedef INT_PTR (WINAPI *NEARPROC_)();
|
||||
typedef INT_PTR (WINAPI *PROC_)();
|
||||
#else
|
||||
# else
|
||||
typedef int (WINAPI *FARPROC_)();
|
||||
typedef int (WINAPI *NEARPROC_)();
|
||||
typedef int (WINAPI *PROC_)();
|
||||
#endif // _WIN64
|
||||
# endif // _WIN64
|
||||
|
||||
# ifdef BOOST_NO_ANSI_APIS
|
||||
__declspec(dllimport) HMODULE_ WINAPI
|
||||
LoadLibrary(
|
||||
LPCTSTR_ lpFileName
|
||||
LoadLibraryW(
|
||||
LPCWSTR_ lpFileName
|
||||
);
|
||||
__declspec(dllimport) HMODULE_ WINAPI
|
||||
GetModuleHandleW(
|
||||
LPCWSTR_ lpFileName
|
||||
);
|
||||
# else
|
||||
__declspec(dllimport) HMODULE_ WINAPI
|
||||
LoadLibraryA(
|
||||
LPCSTR_ lpFileName
|
||||
);
|
||||
__declspec(dllimport) HMODULE_ WINAPI
|
||||
GetModuleHandleA(
|
||||
LPCSTR_ lpFileName
|
||||
);
|
||||
# endif
|
||||
|
||||
__declspec(dllimport) BOOL_ WINAPI
|
||||
FreeLibrary(
|
||||
HMODULE_ hModule
|
||||
@@ -56,10 +77,6 @@ extern "C" {
|
||||
HMODULE_ hModule,
|
||||
LPCSTR_ lpProcName
|
||||
);
|
||||
__declspec(dllimport) HMODULE_ WINAPI
|
||||
GetModuleHandleA(
|
||||
LPCSTR_ lpFileName
|
||||
);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@@ -147,6 +147,8 @@ const DWORD_ wait_failed = (DWORD_)0xFFFFFFFF;
|
||||
|
||||
#endif // defined( BOOST_USE_WINDOWS_H )
|
||||
|
||||
const DWORD_ max_non_infinite_wait = (DWORD_)0xFFFFFFFE;
|
||||
|
||||
BOOST_FORCEINLINE HANDLE_ create_anonymous_mutex(_SECURITY_ATTRIBUTES* lpAttributes, BOOL_ bInitialOwner)
|
||||
{
|
||||
#ifdef BOOST_NO_ANSI_APIS
|
||||
|
Reference in New Issue
Block a user