summaryrefslogtreecommitdiff
path: root/src/posix-lock.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2014-01-09 19:14:09 +0100
committerWerner Koch <wk@gnupg.org>2014-01-17 18:06:37 +0100
commite07538c0ed3c5cb3d870a490a4c12bef4375278a (patch)
tree147e33abcf92c0dc87ebb1f1b7363980a9194714 /src/posix-lock.c
parentd83b12213231443b93de39863b916ada6232035a (diff)
downloadlibgpg-error-e07538c0ed3c5cb3d870a490a4c12bef4375278a.tar.gz
Move version number first in the Posix lock-obj.
* src/posix-lock-obj.h (_gpgrt_lock_t): Swap VERS and MTX and put MTX into a union. * src/posix-lock.c (gpgrt_lock_lock): Adjust for this change. * src/gen-posix-lock-obj.c (main): Change output accordingly. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'src/posix-lock.c')
-rw-r--r--src/posix-lock.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/posix-lock.c b/src/posix-lock.c
index 46e3a84..363cc09 100644
--- a/src/posix-lock.c
+++ b/src/posix-lock.c
@@ -122,7 +122,7 @@ gpgrt_lock_init (gpgrt_lock_t *lockhd)
#if USE_POSIX_THREADS
if (use_pthread_p())
{
- rc = pthread_mutex_init (&lock->mtx, NULL);
+ rc = pthread_mutex_init (&lock->u.mtx, NULL);
if (rc)
rc = gpg_err_code_from_errno (rc);
}
@@ -145,7 +145,7 @@ gpgrt_lock_lock (gpgrt_lock_t *lockhd)
#if USE_POSIX_THREADS
if (use_pthread_p())
{
- rc = pthread_mutex_lock (&lock->mtx);
+ rc = pthread_mutex_lock (&lock->u.mtx);
if (rc)
rc = gpg_err_code_from_errno (rc);
}
@@ -168,7 +168,7 @@ gpgrt_lock_unlock (gpgrt_lock_t *lockhd)
#if USE_POSIX_THREADS
if (use_pthread_p())
{
- rc = pthread_mutex_unlock (&lock->mtx);
+ rc = pthread_mutex_unlock (&lock->u.mtx);
if (rc)
rc = gpg_err_code_from_errno (rc);
}
@@ -193,7 +193,7 @@ gpgrt_lock_destroy (gpgrt_lock_t *lockhd)
#if USE_POSIX_THREADS
if (use_pthread_p())
{
- rc = pthread_mutex_destroy (&lock->mtx);
+ rc = pthread_mutex_destroy (&lock->u.mtx);
if (rc)
rc = gpg_err_code_from_errno (rc);
else