From 175de8b626e53ca24b33fb6a6270bc91f6ea3624 Mon Sep 17 00:00:00 2001 From: Brychan Dempsey Date: Sat, 1 May 2021 13:56:12 +1200 Subject: [PATCH] Added assignment details --- assignment2_handout.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/assignment2_handout.c b/assignment2_handout.c index 2c8517d..da3b83b 100644 --- a/assignment2_handout.c +++ b/assignment2_handout.c @@ -1,3 +1,6 @@ +/* Dempsey-Jensen, Brychan, 14299890, Assignment 2, 159.341 */ +/* Use semaphores to prevent race conditions in a concurrent lift-simulator */ + // -------------------------------------------------- // --- 159.341 Assignment 2 - Lift Simulator --- // -------------------------------------------------- @@ -534,6 +537,18 @@ void *update_floor_counts(void *p) // -------------------------------------------------- int main() { + // Intro stage: + printf("|------------------------------------------|\n"); + printf("| 159.341 2021 Semester 1, Assignment 2 |\n"); + printf("| Submitted by Brychan Dempsey, 14299890 |\n"); + printf("|------------------------------------------|\n"); + printf("\nPress \'enter\' to begin."); + char c; + do { + c = getchar(); + //putchar (c); + } while (!(c == 10 || c == 12)); + // Local variables unsigned long i; semaphore_create(&printSemaphore, 0);