Critical section functions were implemented.
Commented for the critical section functions