#include <stdio.h>
#define RED_LIGHT 0
#define YELLOW_LIGHT 1
#define GREEN_LIGHT 2
void task_red_light(int period) {
printf("Red light ON\n");
}
void task_yellow_light(int period) {
printf("Yellow light ON\n");
}
void task_green_light(int period) {
printf("Green light ON\n");
}
void task_scheduler_rms() {
// Schedule tasks based on priority and period
task_red_light(10);
//high priority 10ms, period
task_yellow_light(5);
//medium priority, 5ms period
task_green_light(15);
// low priority, 15ms period
}
int main() {
task_scheduler_rms();
return 0;
}
#include <stdio.h>
#define RED_LIGHT 0
#define YELLOW_LIGHT 1
#define GREEN_LIGHT 2
void task_red_light(int period) {
printf("Red light ON\n");
}
void task_yellow_light(int period) {
printf("Yellow light ON\n");
}
void task_green_light(int period) {
printf("Green light ON\n");
}
void task_scheduler_rms() {
// Schedule tasks based on priority and period
task_red_light(10);
//high priority 10ms, period
task_yellow_light(5);
//medium priority, 5ms period
task_green_light(15);
// low priority, 15ms period
}
int main() {
task_scheduler_rms();
return 0;
}