Ejemplo n.º 1
0
int main()
{
	UtInit();
	Test1();
	getchar();
	UtExit();
    return 0;
}
Ejemplo n.º 2
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();
}
Ejemplo n.º 3
0
//
// The trampoline function that a user thread begins by executing, through
// which the associated function is called.
//
VOID InternalStart() {
	RunningThread->Function(RunningThread->Argument);
	UtExit();
}