PTHREADS printf, made neighbour index thread safe, check of mutex
[physik/posic.git] / moldyn.c
index ed30815..13d7e5d 100644 (file)
--- a/moldyn.c
+++ b/moldyn.c
@@ -90,6 +90,7 @@ int moldyn_shutdown(t_moldyn *moldyn) {
 #ifdef PTHREADS
        for(i=0;i<moldyn->count;i++)
                pthread_mutex_destroy(&(amutex[i]));
+       free(amutex);
        pthread_mutex_destroy(&emutex);
 #endif
 
@@ -1739,6 +1740,11 @@ int moldyn_integrate(t_moldyn *moldyn) {
        }
 #endif
 
+#ifdef PTHREADS
+       printf("##################\n");
+       printf("# USING PTHREADS #\n");
+       printf("##################\n");
+#endif
        /* tell the world */
        printf("[moldyn] integration start, go get a coffee ...\n");