Changeset View
Changeset View
Standalone View
Standalone View
b/src/posix-lock.c
Context not available. | |||||
#include <stdio.h> | #include <stdio.h> | ||||
#include <string.h> | #include <string.h> | ||||
#include <errno.h> | #include <errno.h> | ||||
#include <assert.h> | |||||
#if USE_POSIX_THREADS | #if USE_POSIX_THREADS | ||||
# include <pthread.h> | # include <pthread.h> | ||||
Context not available. | |||||
/* Thread creation works. */ | /* Thread creation works. */ | ||||
void *retval; | void *retval; | ||||
if (pthread_join (thread, &retval) != 0) | if (pthread_join (thread, &retval) != 0) | ||||
abort (); | { | ||||
assert (!"pthread_join"); | |||||
abort (); | |||||
} | |||||
result = 1; | result = 1; | ||||
} | } | ||||
tested = 1; | tested = 1; | ||||
Context not available. | |||||
_gpgrt_lock_t *lock = (_gpgrt_lock_t*)lockhd; | _gpgrt_lock_t *lock = (_gpgrt_lock_t*)lockhd; | ||||
if (lock->vers != LOCK_ABI_VERSION) | if (lock->vers != LOCK_ABI_VERSION) | ||||
abort (); | { | ||||
assert (!"lock ABI version"); | |||||
abort (); | |||||
} | |||||
if (sizeof (gpgrt_lock_t) < sizeof (_gpgrt_lock_t)) | if (sizeof (gpgrt_lock_t) < sizeof (_gpgrt_lock_t)) | ||||
abort (); | { | ||||
assert (!"sizeof lock obj"); | |||||
abort (); | |||||
} | |||||
return lock; | return lock; | ||||
} | } | ||||
Context not available. | |||||
if (!lock->vers) | if (!lock->vers) | ||||
{ | { | ||||
if (sizeof (gpgrt_lock_t) < sizeof (_gpgrt_lock_t)) | if (sizeof (gpgrt_lock_t) < sizeof (_gpgrt_lock_t)) | ||||
abort (); | { | ||||
assert (!"sizeof lock obj"); | |||||
abort (); | |||||
} | |||||
lock->vers = LOCK_ABI_VERSION; | lock->vers = LOCK_ABI_VERSION; | ||||
} | } | ||||
else /* Run the usual check. */ | else /* Run the usual check. */ | ||||
Context not available. |