Fix whitespace errors.

This commit is contained in:
Geoffrey Challen 2016-02-11 20:10:39 -05:00
parent ec9ae33666
commit 32253d53bc
3 changed files with 38 additions and 38 deletions

View File

@ -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]++;

View File

@ -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; i<CREATELOOPS; i++) {
kprintf_t(".");
@ -207,7 +207,7 @@ locktestthread(void *junk, unsigned long num)
goto fail;
}
random_yielder(4);
if (!(lock_do_i_hold(testlock))) {
goto fail;
}
@ -215,7 +215,7 @@ locktestthread(void *junk, unsigned long num)
lock_release(testlock);
}
/* Check for solutions that don't track ownership properly */
for (i=0; i<NLOCKLOOPS; i++) {
@ -244,7 +244,7 @@ locktest(int nargs, char **args)
(void)args;
int i, result;
kprintf_n("Starting lt1...\n");
for (i=0; i<CREATELOOPS; i++) {
kprintf_t(".");
@ -275,7 +275,7 @@ locktest(int nargs, char **args)
kprintf_t(".");
P(donesem);
}
lock_destroy(testlock);
sem_destroy(donesem);
testlock = NULL;
@ -293,7 +293,7 @@ locktest2(int nargs, char **args) {
(void)args;
int i;
kprintf_n("Starting lt2...\n");
kprintf_n("(This test panics on success!)\n");
for (i=0; i<CREATELOOPS; i++) {
@ -305,12 +305,12 @@ locktest2(int nargs, char **args) {
lock_destroy(testlock);
}
}
ksecprintf(SECRET, "Should panic...", "lt2");
lock_release(testlock);
/* Should not get here on success. */
success(FAIL, SECRET, "lt2");
lock_destroy(testlock);
@ -323,9 +323,9 @@ int
locktest3(int nargs, char **args) {
(void)nargs;
(void)args;
int i;
kprintf_n("Starting lt3...\n");
kprintf_n("(This test panics on success!)\n");
for (i=0; i<CREATELOOPS; i++) {
@ -341,9 +341,9 @@ locktest3(int nargs, char **args) {
ksecprintf(SECRET, "Should panic...", "lt3");
lock_acquire(testlock);
lock_destroy(testlock);
/* Should not get here on success. */
success(FAIL, SECRET, "lt3");
testlock = NULL;
@ -397,7 +397,7 @@ cvtestthread(void *junk, unsigned long num)
random_yielder(4);
cv_broadcast(testcv, testlock);
random_yielder(4);
failif((testval1 != testval2));
failif((testval1 != testval2));
kprintf_n("Thread %lu\n", testval2);
testval1 = (testval1 + NTHREADS - 1) % NTHREADS;
@ -411,9 +411,9 @@ cvtest(int nargs, char **args)
{
(void)nargs;
(void)args;
int i, result;
kprintf_n("Starting cvt1...\n");
for (i=0; i<CREATELOOPS; i++) {
kprintf_t(".");
@ -450,14 +450,14 @@ cvtest(int nargs, char **args)
kprintf_t(".");
P(donesem);
}
lock_destroy(testlock);
cv_destroy(testcv);
sem_destroy(donesem);
testlock = NULL;
testcv = NULL;
donesem = NULL;
kprintf_t("\n");
success(test_status, SECRET, "cvt1");
@ -667,9 +667,9 @@ cvtest4(int nargs, char **args) {
ksecprintf(SECRET, "Should panic...", "cvt4");
cv_broadcast(testcv, testlock);
/* Should not get here on success. */
success(FAIL, SECRET, "cvt4");
lock_destroy(testlock);

View File

@ -781,8 +781,8 @@ subpage_stats(struct pageref *pr, bool quiet)
freemap[index/32] |= (1<<(index%32));
}
}
if (!quiet) {
if (!quiet) {
kprintf("at 0x%08lx: size %-4lu %u/%u free\n",
(unsigned long)prpage, (unsigned long) sizes[blktype],
(unsigned) pr->nfree, 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");