forked from Mirrorlandia_minetest/minetest
abc354a5d0
Cleanup: * Remove volatile keyword, it is of no use at all. [1] * Remove the enable_if stuff. It had no use either. The most likely explanation why the enable_if stuff was there is that it was used as something like a STATIC_ASSERT to verify that sizeof(T) is not larger than sizeof(void *). This check however is not just misplaced in a place where we already use a lock, it isn't needed at all, as gcc will just generate a call to to the runtime if it compiles for platforms that don't support atomic instructions. The runtime will then most likely use locks. Code style fixes: * Prefix name of the mutex * Line everything up nicely, where it makes things look nice * Filling \ continuations with spaces is code style rule Added operations on the atomic var: * Compare and swap * Swap The second point of the cleanup also fixes the Android build of the next commit. [1]: http://stackoverflow.com/q/2484980 |
||
---|---|---|
.. | ||
atomic.h | ||
CMakeLists.txt | ||
event.h | ||
mutex_auto_lock.h | ||
mutex.cpp | ||
mutex.h | ||
semaphore.cpp | ||
semaphore.h | ||
thread.cpp | ||
thread.h |