We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#include "csapp.h" void *thread(void *vargp); #define DEFAULT 4 int main(int argc, char* argv[]) { int N; if (argc > 2) unix_error("too many param"); else if (argc == 2) N = atoi(argv[1]); else N = DEFAULT; int i; pthread_t tid; for (i = 0; i < N; i++) { Pthread_create(&tid, NULL, thread, NULL); } for(i = 0; i < N; i++) { Pthread_join(tid[i], NULL); } } void *thread(void *vargp) { printf("Hello, world\n"); return NULL; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The answer to 12.16 is wrong because the homework states that creates and reaps n joinable peer threads
and the solution to this should be:
The text was updated successfully, but these errors were encountered: