10.31.2011

Queried mutex

I made an awesome little concept for thread synchronization along with a generalization of the thread communication model I described before. In general, it's a set of threads executing functions in a list and, depending on a per-task setting, will remove or keep them forever or until a specific return value. Since I prefer using no malloc except for heavily program-specific parts that actually require dynamic memory, it only needs a small amount of stack memory. However, the real thing of interest is that it used a "queried mutex" which's locking mechanic overcomes the typical racing conditions by creating a chain of n mutexes (is that even the correct word for more than one mutex?).

No comments: