Create skeleton for chapters 6 and 7

This commit is contained in:
Fabio Scotto di Santolo
2024-09-15 14:33:10 +02:00
parent 5da743b9aa
commit afed23d648
2 changed files with 20 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
int main(void) {
int scope;
pthread_attr_t attr;
pthread_attr_init(&attr);
pthread_attr_setscope(&attr, PTHREAD_SCOPE_PROCESS);
if (pthread_attr_getscope(&attr, &scope) != 0) {
fprintf(stderr, "Scope not found");
return EXIT_FAILURE;
} else {
printf("The current scope is %d\n", scope);
}
return EXIT_SUCCESS;
}

0
chp7_deadlock/.gitkeep Normal file
View File