aboutsummaryrefslogtreecommitdiffstats
path: root/src/standalone/upg4
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2021-03-17 01:47:23 +0100
committerGustav Sörnäs <gustav@sornas.net>2021-03-17 01:47:23 +0100
commit185f7edbf34d9926bb0083281fa61e800887eff8 (patch)
treef0abfd8a4be5eb951a4d7fde7a7ac367c05a6b8f /src/standalone/upg4
parent6dab587f279e5320dc3fc2dcc9977af98a323c33 (diff)
parentb7002c53057d4ae049237786d26f00a762dbc2ea (diff)
downloadpintos-rs-main.tar.gz
Merge remote-tracking branch 'upstream/master'main
Diffstat (limited to 'src/standalone/upg4')
-rw-r--r--src/standalone/upg4/use-list.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/standalone/upg4/use-list.c b/src/standalone/upg4/use-list.c
deleted file mode 100644
index 065f71a..0000000
--- a/src/standalone/upg4/use-list.c
+++ /dev/null
@@ -1,42 +0,0 @@
-#include <stdlib.h>
-#include <stdio.h>
-#include <stdarg.h>
-
-/* Pintos contain an implementation of a doubly linked list. It is
- * found in ../../lib/kernel/list.[ch].
- *
- * Recommended compilation commands:
- *
- * This is done once:
- * gcc -Wall -Wextra -std=gnu99 -pedantic -g -c ../../lib/kernel/list.c
- *
- * Then use the precomplied list.o:
- * gcc -Wall -Wextra -std=gnu99 -pedantic -g use-list.c list.o
- */
-#error Read comments above, then remove this line.
-
-#include "../../lib/kernel/list.h"
-
-int main()
-{
- int i, j;
- int N = 1000;
-
- /* create a list */
- for (i = 2; i < N; ++i)
- {
- /* insert the value of the loop variable 'i' in the list */
- }
-
- for (i = 2; i < N; ++i)
- {
- for (j = i*2; j < N; j += i)
- {
- /* remove every with 'j' even divisible number from the list */
- }
- }
-
- /* print all remaining numbers in the list and free any memory
- * allocated */
- return 0;
-}