two infinite loops task on one core in tricore

Forum related to ERIKA Enterprise and RT-Druid version 3

Moderator: paolo.gai

Post Reply
Yuriy
Newbie
Posts: 3
Joined: Wed Jun 12, 2019 3:22 pm

two infinite loops task on one core in tricore

Post by Yuriy » Thu Jun 13, 2019 10:10 am

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: 875
Joined: Thu Dec 07, 2006 12:11 pm

Re: two infinite loops task on one core in tricore

Post by paolo.gai » Thu Jun 13, 2019 11:11 am

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

Ciao,

PJ

Yuriy
Newbie
Posts: 3
Joined: Wed Jun 12, 2019 3:22 pm

Re: two infinite loops task on one core in tricore

Post by Yuriy » Fri Jun 14, 2019 8:17 am

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: 875
Joined: Thu Dec 07, 2006 12:11 pm

Re: two infinite loops task on one core in tricore

Post by paolo.gai » Fri Jun 14, 2019 10:54 am

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

Ciao,

PJ

Post Reply