Author: Russell Reagan
Date: 15:05:35 11/07/02
Go up one level in this thread
On November 07, 2002 at 17:37:32, Robert Hyatt wrote: >>Secondly, I like the Interlocked functions on Windows. Is there anything similar >>on Linux or Unix? > >Not sure what that is, can you explain??? InterlockedIncrement() InterlockedDecrement() InterlockedExchangePointer() InterlockedExchangeAdd() InterlockedCompareExchangePointer() You can read about them at http://msdn.microsoft.com. Basically they perform simple operations atomically. >There is no problem with that. In fact, that (global values) is the common way >to >communicate between threads. Note that this is an SMP-implementation since it >depends on shared memory. What are the restrictions when using this method? Do I need to restrict myself to one way variables? Or should I be ok if either thread is writing and reading to any of the shared variables? Thanks, 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.