Critical section functions were implemented.