diff options
author | Andrew Gregory <andrew.gregory.8@gmail.com> | 2014-09-29 00:11:39 +0200 |
---|---|---|
committer | Andrew Gregory <andrew.gregory.8@gmail.com> | 2017-05-11 06:45:30 +0200 |
commit | 4143760a944470d50975ee27da9e3380223e88b9 (patch) | |
tree | 1e975dd3aeb59ec888292d813c9a147d122153f4 /lib/libalpm/handle.c | |
parent | 5c2208294dc0b21a7aa40b9eb56f64f237c48efb (diff) | |
download | pacman-4143760a944470d50975ee27da9e3380223e88b9.tar.gz pacman-4143760a944470d50975ee27da9e3380223e88b9.tar.xz |
synchronize outside communication
Diffstat (limited to 'lib/libalpm/handle.c')
-rw-r--r-- | lib/libalpm/handle.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c index 08625e3a..941bdd25 100644 --- a/lib/libalpm/handle.c +++ b/lib/libalpm/handle.c @@ -47,6 +47,11 @@ alpm_handle_t *_alpm_handle_new(void) handle->deltaratio = 0.0; handle->lockfd = -1; +#ifdef HAVE_PTHREAD + pthread_mutex_init(&(handle->tlock_cb), NULL); + pthread_mutex_init(&(handle->tlock_log), NULL); +#endif + return handle; } @@ -75,6 +80,11 @@ void _alpm_handle_free(alpm_handle_t *handle) FREELIST(handle->known_keys); #endif +#ifdef HAVE_PTHREAD + pthread_mutex_destroy(&(handle->tlock_cb)); + pthread_mutex_destroy(&(handle->tlock_log)); +#endif + regfree(&handle->delta_regex); /* free memory */ |