#include "system.h" #include "spinlock.h" #include "interCoreManager.h" #include "task.h" #include /* Global variables */ #define SIZE 10 int Number_Sequence[SIZE]; rtems_task rec1_process(rtems_task_argument argument){ while(1){ locked_printf("rec1_process\n"); rtems_task_wake_after(RTEMS_MILLISECONDS_TO_TICKS(argument)); } } rtems_task sed1_process(rtems_task_argument argument){ while(1){ locked_printf("sed1_process\n"); rtems_task_wake_after(RTEMS_MILLISECONDS_TO_TICKS(argument)); } } void main(void) { char task_num; uint32_t cpu_self; uint32_t cpu_nb; interCoreManager_t icm; task_t rec1, sed1; rtems_status_code status; rtems_name task_name; //Initialize the semaphore to make locked_printf locked_print_initialize(); cpu_self = rtems_scheduler_get_processor(); locked_printf("\n**The master task running on CPU%d**\n", cpu_self); cpu_nb = rtems_scheduler_get_processor_maximum(); locked_printf("**%d CPU available in this configuration**\n", cpu_nb); rtems_name msgTo[1]; msgTo[0] = rtems_build_name('r','e','c','0'); rec1 = init_task("rec1",1000, 0, 1, NULL, rec1_process); sed1 = init_task("sed1",1000, 1, 0, msgTo, sed1_process); rtems_task_exit(); }