Template:OS2API Example CritSec

This example shows how a thread enters and exits a critical section of code.