diff options
author | Martin Willi <martin@revosec.ch> | 2014-06-05 13:10:43 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2014-06-06 16:28:28 +0200 |
commit | cab59c73fc616c23bf510dd875363da08ce1850c (patch) | |
tree | 1fff8a93e0451fb8ef6a17de09a4e264559d3e62 /src/libstrongswan/threading/windows | |
parent | bd19e27ae3295f224bf568d0b7d625a5c6bae8b8 (diff) | |
download | strongswan-cab59c73fc616c23bf510dd875363da08ce1850c.tar.bz2 strongswan-cab59c73fc616c23bf510dd875363da08ce1850c.tar.xz |
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.
Diffstat (limited to 'src/libstrongswan/threading/windows')
-rw-r--r-- | src/libstrongswan/threading/windows/thread.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libstrongswan/threading/windows/thread.c b/src/libstrongswan/threading/windows/thread.c index 2ea0f9a7e..2b273413c 100644 --- a/src/libstrongswan/threading/windows/thread.c +++ b/src/libstrongswan/threading/windows/thread.c @@ -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); |