#include
#include
#include
#include “uthread.h”
#include “uthread_mutex_cond.h”
void* a(void* v) {
sleep(1);
printf (“a\n”);
return 0;
}
void* b(void* v) {
sleep(1);
printf (“b\n”);
return 0;
}
int main() {
uthread_init (3);
uthread_t t0 = uthread_create(a, 0);
uthread_t t1 = uthread_create(b, 0);
uthread_join(t0, 0);
uthread_join(t1, 0);
}