From 4f670845ff9ab6c48bcb5f7bf4d4ef6dc3c3064b Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 27 Mar 2012 11:51:08 +0200 Subject: reorganize file structure to match the upstream requirements --- pintos-progos/examples/bubsort.c | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 pintos-progos/examples/bubsort.c (limited to 'pintos-progos/examples/bubsort.c') diff --git a/pintos-progos/examples/bubsort.c b/pintos-progos/examples/bubsort.c deleted file mode 100644 index 343219e..0000000 --- a/pintos-progos/examples/bubsort.c +++ /dev/null @@ -1,38 +0,0 @@ -/* sort.c - - Test program to sort a large number of integers. - - Intention is to stress virtual memory system. - - Ideally, we could read the unsorted array off of the file - system, and store the result back to the file system! */ -#include - -/* Size of array to sort. */ -#define SORT_SIZE 128 - -int -main (void) -{ - /* Array to sort. Static to reduce stack usage. */ - static int array[SORT_SIZE]; - - int i, j, tmp; - - /* First initialize the array in descending order. */ - for (i = 0; i < SORT_SIZE; i++) - array[i] = SORT_SIZE - i - 1; - - /* Then sort in ascending order. */ - for (i = 0; i < SORT_SIZE - 1; i++) - for (j = 0; j < SORT_SIZE - 1 - i; j++) - if (array[j] > array[j + 1]) - { - tmp = array[j]; - array[j] = array[j + 1]; - array[j + 1] = tmp; - } - - printf ("sort exiting with code %d\n", array[0]); - return array[0]; -} -- cgit v1.2.3