Author: Russell Reagan
Date: 18:26:01 12/27/01
Go up one level in this thread
I've taken a look at the Interlocked functions and they look like the best solution since I'll be mainly dealing with some simple data shared between threads. I'd like to make sure I'm understanding a few of them. With pointers aside... InterlockedExchange(A,B) is equivalent to A = B InterlockedCompareExchange(A,B,C) is equivalent to if(A == C) A = B; InterlockedDecrement(A) is equivalent to A--; InterlockedIncrement(A) is equivalent to A++; InterlockedExchangeAdd(A,B) is equivalent to A = A + B; Are these statments *basically* correct? Of course I have left out the facts that some parameters are pointers and such, but I'm working on getting the "general idea" here :) If I am correct in my understanding of how these functions work, then I thank you all very much for your help. Russell
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.