secondary

This commit is contained in:
2025-04-09 15:57:05 +00:00
parent 3895f9a812
commit f735532766
3 changed files with 162 additions and 155 deletions
BIN
View File
Binary file not shown.
+7
View File
@@ -111,6 +111,13 @@ void startThreadOutput(int threadCount) {
if (modeFlag == 1) {
sem_close(one_semaphore);
sem_unlink("one_semaphore");
} else if (modeFlag == 2) {
for (int i = 0; i < 256; i++) {
char semName[10];
sprintf(semName, "S%d", i);
sem_close(multiple_semaphores[i]);
sem_unlink(semName);
}
}
}