1. A method of synchronizing a group of tasks in a microcontroller, said method comprising: each task in said group of tasks in said microcontroller making an initial determination of one or more paths that said each task is likely to follow; each task in said group of tasks in said microcontroller declaring one of need or no need to access a shared resource via a signal in a plurality of signals, based on said initial determination; receiving the plurality of signals from the group of tasks in said microcontroller; granting access to said shared resource, based on the plurality of signals, to one task B in said group of tasks that declares a need to access said shared resource if another task A in said group of tasks in said microcontroller has declared via another signal no need to access said shared resource; said task A executing without accessing said shared resource; and said task B accessing said shared resource only after said granting.