It depends on the build environment... but you asked about the EasyC environment which is the same as the MPLAB/WPILIB build environment.
Code:
<main "loop" in _startup EasyC & Mplab/WPILIB>
Loop:
if (IsAutonomous())
{
Autonomous();
while (IsAutonomous());
}
OperatorControl();
goto Loop;
You can see that if you don't have a while loop in Autonomous, it pops out and will sit waiting for the autonomous period to end. You must have a while loop in Autonomous() to make it work the way you want it too in these build environments. When the autonomous period ends, the WPILIB will pop the call stack and force a return into the main loop above where you'll drop into operator control. You could have a while loop - or not - in operator control and it will work. The Getdata/Putdata to update the packet number etc. to prevent the RLOD due to long code paths is done in the background at interrupt level in these environments.
In IFI/Kevin build environments, the while loop is built into main()
Code:
<IFI code base>
:
.
while (1) /* This loop will repeat indefinitely. */
{
if (statusflag.NEW_SPI_DATA) << when a new data packet arrives from the master processor
{
Process_Data_From_Master_uP(); << this routine does the Getdata/Putdata once per new data packet
if (autonomous_mode)
{
User_Autonomous_Code();
}
}
Process_Data_From_Local_IO(); << this will run every as fast as the code path allows and is run whether there is new data or not
} /* while (1) */
The Getdata/Putdata is done in Process_Data_From_Master_uP() in IFI and in the main() loop in Kevin's code. If the code execution path is too long and the Putdata isn't called, then the master processor keeps getting data packets with the same packet number. Too many of these in a row and the master processor does something like assert the MCLR (master clear) of the user processor halting it. In these environments you don't want a while loop in the autonomous or operator/teleop functions because that will keep the processor from getting back to the main routine to do the needed Putdata call in a timely fashion and you could get the RLOD.
Putdata is where the packet number is typically bumped. The high priority interrupt service routine is the code that is constantly sending/recieving the txdata/rxdata packets from the master processor. It doesn't care if they are updated or not - it has a schedule to keep and keeps on sending/recieving data completing a data packet transfer every 26.2ms.