diff --git a/P5/Main.cpp b/P5/Main.cpp index 5763b41..d9e4893 100644 --- a/P5/Main.cpp +++ b/P5/Main.cpp @@ -9,6 +9,7 @@ using namespace std; // Thread T1 - Schreibt alle Kleinbuchstaben des Alphabets void thread1() { + cout << "T1: "; for (char c = 'a'; c <= 'z'; ++c) { cout << c << ' '; @@ -19,6 +20,7 @@ void thread1() // Thread T2 - Schreibt alle natürlichen Zahlen von 0 bis 32 void thread2() { + cout << "T2: "; for (int i = 0; i <= 32; ++i) { cout << i << ' '; @@ -29,6 +31,7 @@ void thread2() // Thread T3 - Schreibt alle Großbuchstaben des Alphabets void thread3() { + cout << "T3: "; for (char c = 'A'; c <= 'Z'; ++c) { cout << c << ' '; @@ -54,7 +57,7 @@ mutex mtx; void mutexThread1() { mtx.lock(); - + cout << "T1: "; for (char ch = 'a'; ch <= 'z'; ch++) { cout << ch << " "; @@ -68,7 +71,7 @@ void mutexThread2() { mtx.lock(); - + cout << "T2: "; for (int i = 0; i < 33; i++) { cout << i << " "; @@ -81,7 +84,7 @@ void mutexThread2() void mutexThread3() { mtx.lock(); - + cout << "T3: "; for (char ch = 'A'; ch <= 'Z'; ch++) { cout << ch << " "; @@ -106,6 +109,7 @@ Semaphor semaphor(1); void semaphoreThread1() { semaphor.acquire(); + cout << "T1: "; for (char ch = 'a'; ch <= 'z'; ch++) { cout << ch << " "; @@ -117,6 +121,7 @@ void semaphoreThread1() void semaphoreThread2() { semaphor.acquire(); + cout << "T2: "; for (int i = 0; i < 33; i++) { cout << i << " "; @@ -128,6 +133,7 @@ void semaphoreThread2() void semaphoreThread3() { semaphor.acquire(); + cout << "T3: "; for (char ch = 'A'; ch <= 'Z'; ch++) { cout << ch << " "; @@ -148,7 +154,6 @@ void semaphore_init() int main() { - cout << "Asynch" << endl; asynch_init(); diff --git a/P5/Semaphor.h b/P5/Semaphor.h index d0de503..a356b31 100644 --- a/P5/Semaphor.h +++ b/P5/Semaphor.h @@ -8,7 +8,6 @@ private: int count; std::mutex mtx; std::condition_variable cond; - std::queue wait_queue; // Beispielhafte Warteschlange public: Semaphor(int i) : count(i) {} diff --git a/P5/build/Debug/Main.obj b/P5/build/Debug/Main.obj deleted file mode 100644 index dba52ac..0000000 Binary files a/P5/build/Debug/Main.obj and /dev/null differ diff --git a/P5/build/Debug/outDebug.exe b/P5/build/Debug/outDebug.exe deleted file mode 100644 index ed69a49..0000000 Binary files a/P5/build/Debug/outDebug.exe and /dev/null differ diff --git a/P5/build/Debug/outDebug.ilk b/P5/build/Debug/outDebug.ilk deleted file mode 100644 index 0e9d8b1..0000000 Binary files a/P5/build/Debug/outDebug.ilk and /dev/null differ diff --git a/P5/build/Debug/outDebug.pdb b/P5/build/Debug/outDebug.pdb deleted file mode 100644 index 8d966f5..0000000 Binary files a/P5/build/Debug/outDebug.pdb and /dev/null differ diff --git a/P5/build/Debug/vc140.pdb b/P5/build/Debug/vc140.pdb deleted file mode 100644 index 1ff010a..0000000 Binary files a/P5/build/Debug/vc140.pdb and /dev/null differ