Created SILC Runtime Toolkit git repository Part II.
[runtime.git] / lib / silcutil / tests / test_silcmutex.c
index ffe17bd66762e2b6f8807a8fe2f2628207f05f6d..e52e1aafa6e739cac0f0df25987039ce2c2a0468 100644 (file)
@@ -1,7 +1,7 @@
 /* Locking performance tests.  Gives locsk&unlocks/second. */
 /* Version 1.0 */
 
-#include "silc.h"
+#include "silcruntime.h"
 
 typedef struct {
   SilcThread thread;
@@ -84,6 +84,7 @@ int main(int argc, char **argv)
   sleep(1);
   val = rdtsc() - val;
   val /= 1000;                 /* Gives us milliseconds */
+  cpu_freq = val;
   fprintf(stderr, "CPU frequency: %llu\n", val);
 
   max_locks = MAX_LOCKS;
@@ -179,5 +180,5 @@ int main(int argc, char **argv)
 
   fprintf(stderr, "Testing was %s\n", success ? "SUCCESS" : "FAILURE");
 
-  return success;
+  return !success;
 }