semaphores using C++ in console program
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?
If you consider ships outside of the API...
Semaphore is a language used with flags between ships. Like a really big sign language. How does that tie into programming? I'd like to know!