Wait for all threads except the active thread. If the active thread just increment the depth. This should be called before entering a critical section.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.