I am learning about mutex and semaphore. And got a quick question to clarify:
void task1(void* parameter){
while(1){
global_var++;
}
}
void task2(void* parameter){
while(1){
global_var++;
}
}
xTaskCreate(task1,"task1",10000,NULL,1,NULL); // receiving modem input
xTaskCreate(task2,"task2",10000,NULL,1,NULL); // receiving modem input
If I have 2 tasks that are accessing one global variable. Is there a possibility if one task will interrupt another task if both are the same priority? Or the issues only start happening when one command is different priority or the task is being interrupted via the timer or other interrupts?