summaryrefslogtreecommitdiff
path: root/test/test_perfmon_torture.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_perfmon_torture.c')
-rw-r--r--test/test_perfmon_torture.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/test/test_perfmon_torture.c b/test/test_perfmon_torture.c
index f7969fd..763a5b5 100644
--- a/test/test_perfmon_torture.c
+++ b/test/test_perfmon_torture.c
@@ -140,32 +140,32 @@ test_thread_toggle_state(struct test_thread *thread,
group = thread->group;
switch (thread->state) {
- case TEST_RUNNING:
- thread->state = TEST_STOPPING;
- stats->num_thread_started--;
- break;
- case TEST_STOPPED:
- /* restart thread and attach it to the group of the previous thread.
- */
- if (thread->monitored) {
- test_thread_toggle_monitor(thread, stats);
- }
- error = perfmon_group_detach(group);
- error_check(error, "perfmon_group_detach");
- thread_attr_init(&attr, thread->thread->name);
- thread_attr_set_detached(&attr);
- thread->state = TEST_LAUNCHED;
- error = thread_create(&thread->thread, &attr, test_thread_run,
- thread);
- error_check(error, "thread_recreate monitored");
- error = perfmon_group_attach(group, thread->thread);
- error_check(error, "perfmon_group_attach");
- stats->num_thread_start++;
- stats->num_thread_started++;
- break;
- default:
- /* Do nothing if the thread is not in a stable state */
- break;
+ case TEST_RUNNING:
+ thread->state = TEST_STOPPING;
+ stats->num_thread_started--;
+ break;
+ case TEST_STOPPED:
+ /* restart thread and attach it to the group of the previous thread.
+ */
+ if (thread->monitored) {
+ test_thread_toggle_monitor(thread, stats);
+ }
+ error = perfmon_group_detach(group);
+ error_check(error, "perfmon_group_detach");
+ thread_attr_init(&attr, thread->thread->name);
+ thread_attr_set_detached(&attr);
+ thread->state = TEST_LAUNCHED;
+ error = thread_create(&thread->thread, &attr, test_thread_run,
+ thread);
+ error_check(error, "thread_recreate monitored");
+ error = perfmon_group_attach(group, thread->thread);
+ error_check(error, "perfmon_group_attach");
+ stats->num_thread_start++;
+ stats->num_thread_started++;
+ break;
+ default:
+ /* Do nothing if the thread is not in a stable state */
+ break;
}
}