Patent ID: 8001547

Claim:
A method of synchronizing a group of tasks in a microcontroller, the method comprising: each task in the group of tasks in the microcontroller making an initial determination of one or more code paths that said each task is likely to follow; each task, in the group of tasks in the microcontroller, declaring in a signal among a plurality of signals one of need or no need to access a shared resource expected at a synchronization point in said one or more code paths identified in the initial determination, prior to reaching the synchronization point; receiving said signal from said each task in the group of tasks in the microcontroller; granting access to the shared resource, based on the plurality of signals, to a second task in the group of tasks that declares in a second signal among the plurality of signals a need to access the shared resource if a first task in the group of tasks in the microcontroller has declared in a first signal among the plurality of signals no need to access the shared resource; the first task executing without accessing the shared resource; the second task accessing the shared resource only after said granting; a third task in the group of tasks declares in a third signal in the plurality of signals, a need to access the shared resource; and subsequent to said declaring by the third task in the third signal and when the synchronization point is reached, further declaring by the third task in a fourth signal in the plurality of signals, no need to access the shared resource thereby to indicate a change in expectation on the access to the shared resource by the third task.