/* * Author : Sebastien Levieux * Date : 13/12/2024 */ Description: The aim of this application is to test the RTEMS semaphore. A global variable, called Number_Sequence, is an integer array of size 10, filled with values of this form: [x, x+1, x+2, ... , x+8, x+9]. The master thread creates 3 tasks which will, in an infinite loop, read the array and add 1 to each value. The master task also performs an infinite loop, but reads and displays the array values. The aim is for the master task to display an array that always looks like the basic form [x, x+1, x+2, ... , x+8, x+9]. A semaphore is required to control access to Number_Sequence Note: In this application, task behavior with respect to the semaphore is based on spinlock (active waiting). Files: init.c : File with the main function locked_print.c : A set of functions allowing printf to be used in a multiprocessor context This file is provided by rtems in this folder rcc-1.3-rc9-gcc/src/rcc-1.3-rc9/testsuites/support/include Makefile : Compilation file grmon.cmd : File with a list of command for grmon3 system.h : System configuration and global variable file for the application Result: **The master task running on CPU3** **4 CPU available in this configuration** **Hello World!!! I am task T0 and I am executing on CPU2** **Hello World!!! I am task T1 and I am executing on CPU1** **Hello World!!! I am task T2 and I am executing on CPU0** **Master Task : Number_Sequence = [0,1,2,3,4,5,6,7,8,9]** **Master Task : Number_Sequence = [1,2,3,4,5,6,7,8,9,10]** **Master Task : Number_Sequence = [2,3,4,5,6,7,8,9,10,11]** **Master Task : Number_Sequence = [6,7,8,9,10,11,12,13,14,15]** **Master Task : Number_Sequence = [9,10,11,12,13,14,15,16,17,18]** **Master Task : Number_Sequence = [13,14,15,16,17,18,19,20,21,22]** **Master Task : Number_Sequence = [...