genodelabs/genode — Issue #123: Merge spin-lock implementations.
Author: skalk
Created: 2012-02-21 10:04:45+00:00
State: open
Labels: cleanup

There are at least two different implementations for spin-locks in the generic lock-implementation and in Fiasco.OC's kernel-capability slot allocator. In general, there are some rare issues where we need a more simple lock implementation than the Cancelable_lock class, introducing thread-queues, blocking, etc.
It would be nice to remedy the current code-duplication. Moreover, the lock-library's spin-lock already benefits from a kernel-specific performance hook (thread_yield() function) that slightly limits the performance drawback of the spin-lock. So it's straight-forward to make the internally used spin-lock of the lock-library useable to the outside-world.