Example #1
0
void TestQueue1::consumer_b_thread()
{
    printHello();

    while (1)
    {
        int value = m_q.receive();
        printf("%s received %d\r\n", threadIdString(), value);
    }
}
Example #2
0
void TestQueue1::producer_thread()
{
    printHello();

    int counter = 0;
    while (1)
    {
        int value = ++counter;
        printf("%s sending %d\r\n", threadIdString(), value);
        m_q.send(value);

        Ar::Thread::sleep(2000);
    }
}
void KernelTest::printTicks()
{
    uint32_t ticks = Ar::Kernel::getTickCount();
    printf("%s ticks=%u!\r\n", threadIdString(), ticks);
}
void KernelTest::printHello()
{
    printf("%s running\r\n", threadIdString());
}