On another baorad I've been following an interesting discussion regarding semaphores to protect a critical section of code in a multithreaded program using standard C++ in console mode. The only system call allowed is CreateThread(). Anybody here familiar with the topic? Anybody have an example of the use of a semaphore outside of the API functions, or have knowledge of the code underlying the API functions dealing with semaphores, or websites I might check for same?