Exemplo n.º 1
0
//---------------------------------------------------------------------------
template<> OS_PROCESS void TProc1::exec()
{
    for(;;)
    {
        Timer_Flag.wait();
        SlonQueue.push(&African);
    }     
}
//---------------------------------------------------------------------------
template<> void TProc1::exec()
{
    for(;;)
    {
        Timer1_Ovf.wait();
        SlonQueue.push(&African);
    }
}
Exemplo n.º 3
0
//---------------------------------------------------------------------------
template<> OS_PROCESS void TProc2::exec()
{
    for(;;)
    {
        T += OS::get_tick_count();
             
        sleep(1);
        SlonQueue.push(&Indian);
    }
}
Exemplo n.º 4
0
//---------------------------------------------------------------------------
template<> OS_PROCESS void TProc3::exec()
{
    for(;;)
    {
        //--------------------------------------------------
        //
        //            Channel test
        //
        //
        //     Get data through channel
        //
        TSlon *p;
        SlonQueue.pop(p);     // get pointer from queue
        p->eat();             // feed the appropriate Slon
    }
}