1 | #include <stdio.h> |
2 | #include <errno.h> |
3 | #include <sys/signal.h> |
4 | #include "Tmk.h" |
5 | void main(int argc, char **argv) |
6 | { |
7 | int c ; |
8 | while ((c = getopt(argc, argv, "")) != -1) ; |
9 | Tmk_startup(argc, argv); |
10 | printf("hello from process %d\n", Tmk_proc_id) ; |
11 | /* All processes wait for keyboard input on local host. */ |
12 | if(Tmk_proc_id == 0) |
13 | do { |
14 | c = getchar() ; |
15 | } while (c < 0 && errno == EINTR); |
16 | Tmk_barrier(0); |
17 | Tmk_exit(0); |
18 | } |