two infinite loops task on one core in tricore

Forum related to ERIKA Enterprise and RT-Druid version 3

Moderator: paolo.gai

Locked
Yuriy

two infinite loops task on one core in tricore

Post by Yuriy »

Hello,

Does it possible create two infinite loops task on one core? I red about extended tasks in Erika V3.

Could you give me example OIL.

Thank you.
paolo.gai
Administrator
Posts: 877
Joined: Thu Dec 07, 2006 12:11 pm

Re: two infinite loops task on one core in tricore

Post by paolo.gai »

There are various event demos in the templates available in the standard distribution. just instantiate one of them...

Ciao,

PJ
Yuriy

Re: two infinite loops task on one core in tricore

Post by Yuriy »

Thank you for fast answer.

But in examples i can't use infinite loops, i should use WaitEvent and wait event.


I need something like that.

Code: Select all

TASK(Producer)
{
	for (;;){}
}

TASK(Consumer)
{
    for (;;){}
}

Code: Select all


    TASK Consumer {
        PRIORITY = 2;
        ACTIVATION = 1;
        STACK = PRIVATE {
            SYS_SIZE = 256;
        };
        AUTOSTART   = TRUE;
        SCHEDULE = NON;
        EVENT = ProducerEvent;
    };

    TASK Producer {
        PRIORITY = 3;
        ACTIVATION = 1;
        STACK = PRIVATE {
            SYS_SIZE = 256;
        };
        AUTOSTART   = TRUE;
        SCHEDULE    = NON;
        EVENT       = ConsumerEvent;
    };

but it doesn't work. Execution only Producer. it looks like green threads https://en.wikipedia.org/wiki/Green_threads
When a green thread executes a blocking system call, not only is that thread blocked, but all of the threads within the process are blocked
Can you help me?
paolo.gai
Administrator
Posts: 877
Joined: Thu Dec 07, 2006 12:11 pm

Re: two infinite loops task on one core in tricore

Post by paolo.gai »

ERIKA is an AUTOSAR OS. Please check the specification, the scheduling is priority driven, with immediate priority ceiling. No Round Robin.

Ciao,

PJ
Locked