Clean up threading 2613/head
authorShadowNinja <shadowninja@minetest.net>
Tue, 7 Apr 2015 10:13:12 +0000 (06:13 -0400)
committerShadowNinja <shadowninja@minetest.net>
Mon, 24 Aug 2015 02:04:06 +0000 (22:04 -0400)
commite4bff8be94c0db4f94e63ad448d0eeb869ccdbbd
tree7935586e79da5c8c7144e345a8c0fc1cda53beed
parent6a1047d8c116f793890b63427d53f04ceca95d54
Clean up threading

  * Rename everything.
    * Strip J prefix.
    * Change UpperCamelCase functions to lowerCamelCase.
  * Remove global (!) semaphore count mutex on OSX.
  * Remove semaphore count getter (unused, unsafe, depended on internal
    API functions on Windows, and used a hack on OSX).
  * Add `Atomic<type>`.
  * Make `Thread` handle thread names.
  * Add support for C++11 multi-threading.
  * Combine pthread and win32 sources.
  * Remove `ThreadStarted` (unused, unneeded).
  * Move some includes from the headers to the sources.
  * Move all of `Event` into its header (allows inlining with no new includes).
  * Make `Event` use `Semaphore` (except on Windows).
  * Move some porting functions into `Thread`.
  * Integrate logging with `Thread`.
  * Add threading test.
79 files changed:
.gitignore
build/android/jni/Android.mk
src/CMakeLists.txt
src/ban.cpp
src/ban.h
src/client.cpp
src/client.h
src/client/clientlauncher.cpp
src/client/tile.cpp
src/clientiface.cpp
src/clientiface.h
src/clientmap.cpp
src/clientmap.h
src/debug.cpp
src/emerge.cpp
src/emerge.h
src/environment.cpp
src/environment.h
src/httpfetch.cpp
src/jthread/CMakeLists.txt [deleted file]
src/jthread/LICENSE.MIT [deleted file]
src/jthread/jevent.h [deleted file]
src/jthread/jmutex.h [deleted file]
src/jthread/jmutexautolock.h [deleted file]
src/jthread/jsemaphore.h [deleted file]
src/jthread/jthread.h [deleted file]
src/jthread/pthread/jevent.cpp [deleted file]
src/jthread/pthread/jmutex.cpp [deleted file]
src/jthread/pthread/jsemaphore.cpp [deleted file]
src/jthread/pthread/jthread.cpp [deleted file]
src/jthread/win32/jevent.cpp [deleted file]
src/jthread/win32/jmutex.cpp [deleted file]
src/jthread/win32/jsemaphore.cpp [deleted file]
src/jthread/win32/jthread.cpp [deleted file]
src/log.cpp
src/main.cpp
src/mapblock.cpp
src/mg_decoration.cpp
src/mg_decoration.h
src/minimap.cpp
src/minimap.h
src/network/clientpackethandler.cpp
src/network/connection.cpp
src/network/connection.h
src/particles.cpp
src/particles.h
src/player.cpp
src/player.h
src/porting.cpp
src/porting.h
src/porting_android.cpp
src/profiler.h
src/quicktune.cpp
src/script/cpp_api/s_async.cpp
src/script/cpp_api/s_async.h
src/script/cpp_api/s_base.h
src/script/cpp_api/s_internal.h
src/server.cpp
src/server.h
src/settings.cpp
src/settings.h
src/shader.cpp
src/threading/CMakeLists.txt [new file with mode: 0644]
src/threading/atomic.h [new file with mode: 0644]
src/threading/event.h [new file with mode: 0644]
src/threading/mutex.cpp [new file with mode: 0644]
src/threading/mutex.h [new file with mode: 0644]
src/threading/mutex_auto_lock.h [new file with mode: 0644]
src/threading/semaphore.cpp [new file with mode: 0644]
src/threading/semaphore.h [new file with mode: 0644]
src/threading/thread.cpp [new file with mode: 0644]
src/threading/thread.h [new file with mode: 0644]
src/threads.h
src/unittest/CMakeLists.txt
src/unittest/test_threading.cpp [new file with mode: 0644]
src/util/container.h
src/util/numeric.cpp
src/util/numeric.h
src/util/thread.h