SQ?? tevent: Test tevent_immediate performance
authorStefan Metzmacher <metze@samba.org>
Mon, 22 Aug 2016 10:15:04 +0000 (12:15 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 17 May 2018 07:52:28 +0000 (09:52 +0200)
lib/tevent/testsuite.c

index 4c4d4700b1aebd95e3240b3cf2e3b7cdcd57f842..ab77d605c176dc3ec45e216c1f24389aaffc2852 100644 (file)
@@ -699,6 +699,8 @@ static bool test_event_fd2(struct torture_context *tctx,
        return true;
 }
 
+#ifdef HAVE_PTHREAD
+
 struct immediate_perf_state {
        pthread_mutex_t mutex;
        struct timeval start;
@@ -781,8 +783,6 @@ static bool test_event_context_immediate_perf(struct torture_context *test,
        return true;
 }
 
-#ifdef HAVE_PTHREAD
-
 static pthread_mutex_t threaded_mutex = PTHREAD_MUTEX_INITIALIZER;
 static bool do_shutdown = false;
 
@@ -1657,9 +1657,11 @@ struct torture_suite *torture_local_event_perf(TALLOC_CTX *mem_ctx)
        struct torture_suite *suite = torture_suite_create(
                mem_ctx, "event_perf");
 
+#ifdef HAVE_PTHREAD
        torture_suite_add_simple_tcase_const(suite, "immediate_perf",
                                             test_event_context_immediate_perf,
                                             NULL);
+#endif
 
        return suite;
 }