int main() { UtInit(); Test1(); getchar(); UtExit(); return 0; }
VOID Test1_Thread ( UT_ARGUMENT Argument ) { UCHAR Char; ULONG Index; Char = (UCHAR) Argument; for (Index = 0; Index < 1000; ++Index) { putchar(Char); if ((rand() % 4) == 0) { UtYield(); } } ++Test1_Count; UtExit(); }
// // The trampoline function that a user thread begins by executing, through // which the associated function is called. // VOID InternalStart() { RunningThread->Function(RunningThread->Argument); UtExit(); }