Archive for May, 2011:

Tangle Trap’s First Blender Foundation Support

Well folks, Tangle Trap has been out for almost two months now and we’ve finally received the reports for its first month of sales. As promised, 25% of the opening weekend sales and 5% of ongoing sales will be donated to the Blender Foundation to help support the excellent work they do. Here’s the skinny: [...]

Leave a Comment

Multithreaded Programming Part 3: Going Lockless

Ultimately, the whole point of a lock is to take a multi-part operation and make it atomic. The AddDagron() function from the previous post in the series, for example, takes the operations of incrementing the Dagron count, reallocating the array of Dagron pointers, and adding the new Dagron to the array, and effectively turns it [...]

Comments (1)

Multithreaded Programming Part 2.5: MRSW Lock Code

<– Part 2. As promised, here is our modified version of Glenn Slayden‘s Multi-Reader-Single-Writer lock code. We’d like to thank Glenn for posting the original code. // // Multi-reader Single-writer concurrency base class for Win32 // // (c) 1999-2003 by Glenn Slayden (glenn@glennslayden.com) // // http://www.glennslayden.com/code/win32/reader-writer-lock // This code has been modified from the original, [...]

Comments (1)

Multithreaded Programming Part 2: Multiple Reader/Single Writer Lock

<–Part 1 Last time, we saw how to protect a shared resource with a critical section. Today we’ll look at why a critical section, though technically correct, can cause problems. Let’s write some critical-section-protected code and see what might happen: SharedResource gSharedResource; CRITICAL_SECTION g_csResourceLock; // Assume that this has been initialized properly Glob GlobulateSharedResource() { [...]

Comments (2)

Multithreaded Programming Part 1: The Critical Section Lock

Most of the time, when we’re programming, we can think about our programs in a very sequential fashion: First do this, then do that, then finish with the other. This is even true with modern, multicore architectures, including the PC, XBox 360, and PlayStation 3. Usually, it’s for one of two reasons: Either there is [...]

Leave a Comment