Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Threads

Author: Manfred Rosenboom

Date: 23:10:51 04/06/99

Go up one level in this thread


On April 07, 1999 at 01:29:30, James Robertson wrote:

>>If you just want to do what you said above, you can use a CRITICAL_SECTION,
>>which will implement the atomic test-and-set operation that you were trying to
>>do above (it does everything you did in your example, but it can't kill itself
>>the way I described, since the "test" and the "set" are guaranteed to happen in
>>such a way that nothing can slip between them).
>
>Just out of curiosity, how does a critical_section do this? Is it something
>built into Windows?

Yes, the routines are part of the Win32 kernel.
They are implemented to be atomic, i.e. they can't be interrupted.

Manfred



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.