diff options
author | Martin Willi <martin@strongswan.org> | 2005-12-06 11:51:40 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2005-12-06 11:51:40 +0000 |
commit | d381f366088751f30923223917f0dddfa94f1865 (patch) | |
tree | d7b12a2456c289cb85e725a5b50855d3af6dca71 | |
parent | 668f9fcba9cbc67d09410a25e77dc217df45ee2a (diff) | |
download | strongswan-d381f366088751f30923223917f0dddfa94f1865.tar.bz2 strongswan-d381f366088751f30923223917f0dddfa94f1865.tar.xz |
- cancelling of busy prime thread allowed
-rw-r--r-- | Source/charon/threads/prime_pool.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/charon/threads/prime_pool.c b/Source/charon/threads/prime_pool.c index cee51d8f7..b5c879677 100644 --- a/Source/charon/threads/prime_pool.c +++ b/Source/charon/threads/prime_pool.c @@ -301,6 +301,10 @@ void generate_primes(private_prime_pool_t *this) selected_prime_list->primes->insert_last(selected_prime_list->primes, (void*)prime); pthread_mutex_unlock(&(this->mutex)); } + /* abort if requested */ + pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); + pthread_testcancel(); + pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); } } |