diff options
author | Martin Willi <martin@revosec.ch> | 2014-06-06 16:32:31 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2014-06-06 16:33:50 +0200 |
commit | 4f31b3f7243d4d368ac88bda6af477e542d77aae (patch) | |
tree | 1e931ba67796aece980de91caa301cb2ae196ed6 /src/libstrongswan/threading/windows/thread.c | |
parent | 9d228ddb04b7adc7c5904b98bc7857b12176904a (diff) | |
parent | fd372e13a238180102168770ff8e60c82ba59da2 (diff) | |
download | strongswan-4f31b3f7243d4d368ac88bda6af477e542d77aae.tar.bz2 strongswan-4f31b3f7243d4d368ac88bda6af477e542d77aae.tar.xz |
Merge branch 'win-32bit'
Fixes some issues when building 32-bit Windows binaries. Mostly related
to the call API. Introduces a Travis 32-bit Windows build variant.
Diffstat (limited to 'src/libstrongswan/threading/windows/thread.c')
-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); |