diff --git a/chp6_scheduler/test_thread_scope.c b/chp6_scheduler/test_thread_scope.c new file mode 100644 index 0000000..4355309 --- /dev/null +++ b/chp6_scheduler/test_thread_scope.c @@ -0,0 +1,20 @@ +#include +#include +#include + +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; +} diff --git a/chp7_deadlock/.gitkeep b/chp7_deadlock/.gitkeep new file mode 100644 index 0000000..e69de29