/* * CS460: Operating Systems * Jim Plank * hw.c -- hello world with the sun lightweight process library * */ #include #include #include #include #include printme() { printf("Hello world\n"); } main() { stkalign_t *s; thread_t t; lwp_setstkcache(MINSTACKSZ*sizeof(stkalign_t), 1); s = lwp_newstk(); lwp_create(&t, printme, 1, 0, s, 0); lwp_join(t); }