windows: Use WINAPI call convention for Windows API callbacks

For x86_64 it does not actually matter, but for i686 builds the call convention
is different with WINAPI.
This commit is contained in:
Martin Willi
2014-06-06 16:28:28 +02:00
parent bd19e27ae3
commit cab59c73fc
8 changed files with 28 additions and 23 deletions
+4 -2
View File
@@ -378,8 +378,10 @@ void thread_set_active_condvar(CONDITION_VARIABLE *condvar)
/**
* APC to cancel a thread
*/
static void docancel(private_thread_t *this)
static void WINAPI docancel(ULONG_PTR dwParam)
{
private_thread_t *this = (private_thread_t*)dwParam;
/* make sure cancel() does not access this anymore */
threads_lock->lock(threads_lock);
threads_lock->unlock(threads_lock);
@@ -398,7 +400,7 @@ METHOD(thread_t, cancel, void,
if (!this->cancel_pending)
{
this->cancel_pending = TRUE;
QueueUserAPC((void*)docancel, this->handle, (uintptr_t)this);
QueueUserAPC(docancel, this->handle, (uintptr_t)this);
if (this->condvar)
{
WakeAllConditionVariable(this->condvar);