echo ' done'
done
- for target in distcheck memcheck leakcheck install upload-coverage \
+ for target in distcheck memcheck leakcheck hellcheck install upload-coverage \
coverage upload-doc upload-release transifex; do
echo "$target:"
echo ' $(MAKE) -C ./local' $target
@for dir in $(SUBDIRS); do \
test "$$dir" = "." || $(MAKE) -C $$dir leakcheck; \
done
+
+hellcheck:
+ @for dir in $(SUBDIRS); do \
+ test "$$dir" = "." || $(MAKE) -C $$dir hellcheck; \
+ done
LEAKCHECK_ENV = $(TEST_RUNNER) valgrind --error-exitcode=81 --quiet --leak-check=yes
+HELLCHECK_ENV = $(TEST_RUNNER) valgrind --error-exitcode=82 --quiet --tool=helgrind
+
memcheck: all
make $(AM_MAKEFLAGS) TESTS_ENVIRONMENT="$(MEMCHECK_ENV)" check-TESTS
leakcheck: all
make $(AM_MAKEFLAGS) TESTS_ENVIRONMENT="$(LEAKCHECK_ENV)" check-TESTS
+
+hellcheck: all
+ make $(AM_MAKEFLAGS) TESTS_ENVIRONMENT="$(HELLCHECK_ENV)" check-TESTS
int ret;
pthread_mutexattr_init (&attr);
- pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE);
+ pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_DEFAULT);
ret = pthread_mutex_init (mutex, &attr);
assert (ret == 0);
pthread_mutexattr_destroy (&attr);
mod->initialize_thread = self;
/* Change over to the module specific mutex */
- p11_mutex_lock (&mod->initialize_mutex);
p11_unlock ();
+ p11_mutex_lock (&mod->initialize_mutex);
if (!mod->initialize_called) {
assert (mod->funcs);