Commit 375bea4b authored by Thanassis Tsiodras's avatar Thanassis Tsiodras

Tested on NGMP (4 cores SMP)

parent cdc52d0d
Pipeline #116 skipped
......@@ -10,6 +10,6 @@ void task_begin(int task_no)
void task_end(int task_no)
{
rtems_event_send(g_init_task_id, RTEMS_EVENT_0 + task_no);
rtems_event_send(g_init_task_id, RTEMS_EVENT_0 << task_no);
rtems_task_delete(RTEMS_SELF);
}
......@@ -3,7 +3,7 @@
*
*/
#define CONFIGURE_INIT
#define TASKS 2
#define TASKS 4
#define DEFINE_VARS
#include "system.h"
......@@ -31,7 +31,7 @@ rtems_task Init(rtems_task_argument argument)
RTEMS_MINIMUM_STACK_SIZE,
RTEMS_DEFAULT_MODES, // use RTEMS_DEFAULT_MODES | RTEMS_TIMESLICE for Linux/Windows like
// handling of tasks with same priority (i.e. pre-emption)
i == 0 ? RTEMS_FLOATING_POINT : RTEMS_DEFAULT_ATTRIBUTES,
(i%2) == 0 ? RTEMS_FLOATING_POINT : RTEMS_DEFAULT_ATTRIBUTES,
&Task_id[i]);
if (status != RTEMS_SUCCESSFUL) {
printf("[PARENT] Failed to rtems_task_create... status:%0x\n", status);
......@@ -41,7 +41,7 @@ rtems_task Init(rtems_task_argument argument)
// Start Task
status = rtems_task_start(
Task_id[i],
i == 0 ? Task1_EntryPoint : Task2_EntryPoint,
(i%2) == 0 ? Task1_EntryPoint : Task2_EntryPoint,
i);
}
// To give coverage code the opportunity to work, wait for child tasks to die first.
......@@ -51,7 +51,7 @@ rtems_task Init(rtems_task_argument argument)
rtems_option options = (RTEMS_EVENT_ANY | RTEMS_WAIT);
rtems_event_set in = 0;
for (i=0; i<TASKS; i++)
in |= (RTEMS_EVENT_0 + i);
in |= (RTEMS_EVENT_0 << i);
rtems_event_set out;
rtems_event_set non_completed = in;
while (non_completed) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment