#include "userlib/syscall.h" #include "userlib/libnachos.h" const int N = 3; int iplein = 0; int ivide = 0; int tab[3]; SemId svide; SemId splein; void th1(); void th2(); int main() { ThreadId th1 = threadCreate("th1", th1); ThreadId th2 = threadCreate("th2", th2); Join(th1); Join(th2); return 0; } void th1() { for(int i = 0; i < 10; i++) { n_printf("Hello from th1\n"); } } void th2() { for(int i = 0; i < 10; i++) { n_printf("Hello from th2\n"); } }