mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 18:43:03 +01:00
Fix warning on Win64 build (#231)
This commit is contained in:
parent
bb0ed29e19
commit
dac8634de9
@ -309,13 +309,16 @@ ThreadId Thread::start(ThreadEntryPoint* routine, void* arg, int priority_arg, H
|
|||||||
* Advanced Windows by Richter pg. # 109. */
|
* Advanced Windows by Richter pg. # 109. */
|
||||||
|
|
||||||
unsigned thread_id;
|
unsigned thread_id;
|
||||||
unsigned long real_handle =
|
HANDLE handle =
|
||||||
_beginthreadex(NULL, 0, THREAD_ENTRYPOINT, THREAD_ARG, CREATE_SUSPENDED, &thread_id);
|
reinterpret_cast<HANDLE>(_beginthreadex(NULL, 0, THREAD_ENTRYPOINT, THREAD_ARG, CREATE_SUSPENDED, &thread_id));
|
||||||
if (!real_handle)
|
if (!handle)
|
||||||
{
|
{
|
||||||
|
// Though MSDN says that _beginthreadex() returns error in errno,
|
||||||
|
// GetLastError() still works because RTL call no other system
|
||||||
|
// functions after CreateThread() in the case of error.
|
||||||
|
// Watch out if it is ever changed.
|
||||||
Firebird::system_call_failed::raise("_beginthreadex", GetLastError());
|
Firebird::system_call_failed::raise("_beginthreadex", GetLastError());
|
||||||
}
|
}
|
||||||
HANDLE handle = reinterpret_cast<HANDLE>(real_handle);
|
|
||||||
|
|
||||||
SetThreadPriority(handle, priority);
|
SetThreadPriority(handle, priority);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user