/* * Author : Sebastien Levieux * Date : 13/12/2024 */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "system.h" #include "spinlock.h" #include /* Global variables */ spinlock_t sp1; #define SIZE 10 int Number_Sequence[SIZE]; rtems_task Test_task( rtems_task_argument argument ) { uint32_t cpu_self; char *task_name; char name[5]; /* Get the task name */ task_name = rtems_object_get_name( RTEMS_SELF, 5, name ); if(&task_name==NULL) { locked_printf("\n**rtems_object_get_name return NULL**\n"); exit(1); } /* Get the CPU Number */ cpu_self = rtems_scheduler_get_processor(); locked_printf("**Hello World!!! I am task %s and I am executing on CPU%d**\n", task_name, cpu_self); while(1){ //lock_spinlock and Update Number_Sequence lock_spinlock(sp1); for(int i=0;i