From 32253d53bc7bf6246d7298e27ae48abe81dd0695 Mon Sep 17 00:00:00 2001 From: Geoffrey Challen Date: Thu, 11 Feb 2016 20:10:39 -0500 Subject: [PATCH] Fix whitespace errors. --- kern/test/synchprobs.c | 22 +++++++++++----------- kern/test/synchtest.c | 42 +++++++++++++++++++++--------------------- kern/vm/kmalloc.c | 12 ++++++------ 3 files changed, 38 insertions(+), 38 deletions(-) diff --git a/kern/test/synchprobs.c b/kern/test/synchprobs.c index 5b6361e..9a13b31 100644 --- a/kern/test/synchprobs.c +++ b/kern/test/synchprobs.c @@ -278,7 +278,7 @@ whalemating(int nargs, char **args) { test_message = ""; whalemating_init(); - + /* Start males and females only. */ for (i = 0; i < 2; i++) { for (j = 0; j < NMATING; j++) { @@ -302,12 +302,12 @@ whalemating(int nargs, char **args) { } } - /* Wait for males and females to start. */ + /* Wait for males and females to start. */ for (i = 0; i < NMATING * 2; i++) { kprintf_t("."); P(startsem); } - + /* Make sure nothing is happening... */ loop_status = SUCCESS; for (i = 0; i < CHECK_TIMES && loop_status == SUCCESS; i++) { @@ -323,7 +323,7 @@ whalemating(int nargs, char **args) { if (failif((loop_status == FAIL), "failed: uncoordinated matchmaking is occurring")) { goto done; } - + /* Create the matchmakers */ for (j = 0; j < NMATING; j++) { kprintf_t("."); @@ -336,11 +336,11 @@ whalemating(int nargs, char **args) { } total_count++; } - + /* * Release a random number of matchmakers and wait for them and their * matches to finish. - */ + */ int pivot = (random() % (NMATING - 2)) + 1; for (i = 0; i < pivot; i++) { kprintf_t("."); @@ -351,8 +351,8 @@ whalemating(int nargs, char **args) { P(endsem); total_count--; } - - /* Make sure nothing else is happening... */ + + /* Make sure nothing else is happening... */ loop_status = SUCCESS; for (i = 0; i < CHECK_TIMES && loop_status == SUCCESS; i++) { kprintf_t("."); @@ -368,7 +368,7 @@ whalemating(int nargs, char **args) { if (failif((loop_status == FAIL), "failed: uncoordinated matchmaking is occurring")) { goto done; } - + /* * Release the rest of the matchmakers and wait for everyone to finish. */ @@ -415,7 +415,7 @@ done: sem_destroy(startsem); sem_destroy(endsem); sem_destroy(matcher_sem); - + kprintf_t("\n"); if (test_status != SUCCESS) { ksecprintf(SECRET, test_message, "sp1"); @@ -570,7 +570,7 @@ inQuadrant(int quadrant, uint32_t index) { } failif((quadrant != target_quadrant), "failed: invalid turn"); car_turn_times[index]++; - + failif((quadrant_array[quadrant] > 0), "failed: collision"); quadrant_array[quadrant]++; diff --git a/kern/test/synchtest.c b/kern/test/synchtest.c index 56ff74a..a90173d 100644 --- a/kern/test/synchtest.c +++ b/kern/test/synchtest.c @@ -83,7 +83,7 @@ semtestthread(void *junk, unsigned long num) (void)junk; int i; - + random_yielder(4); /* @@ -111,7 +111,7 @@ semtest(int nargs, char **args) (void)args; int i, result; - + kprintf_n("Starting sem1...\n"); for (i=0; infree, n); @@ -811,7 +811,7 @@ kheap_printstats(void) spinlock_acquire(&kmalloc_spinlock); kprintf("Subpage allocator status:\n"); - + for (pr = allbase; pr != NULL; pr = pr->next_all) { subpage_stats(pr, false); } @@ -820,7 +820,7 @@ kheap_printstats(void) } /* - * Print the whole heap. + * Print number of used heap bytes. */ void kheap_printused(void) @@ -829,13 +829,13 @@ kheap_printused(void) unsigned long total = 0; /* print the whole thing with interrupts off */ spinlock_acquire(&kmalloc_spinlock); - + for (pr = allbase; pr != NULL; pr = pr->next_all) { total += subpage_stats(pr, true); } spinlock_release(&kmalloc_spinlock); - + char total_string[32]; snprintf(total_string, sizeof(total_string), "%lu", total); ksecprintf(SECRET, total_string, "khu");