aboutsummaryrefslogtreecommitdiff
path: root/src/debug.cpp
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-08-19 11:29:46 +0200
committerGitHub <noreply@github.com>2017-08-19 11:29:46 +0200
commitde4c2e4250d3071a8de7841a1cb3a63af67c63f3 (patch)
treeaa959d1f450ebf25c7be6b4e088e50e15bf4c9ee /src/debug.cpp
parentb82884aa62fc0b00bbaef6c31cde095d9ed6f72f (diff)
downloadminetest-de4c2e4250d3071a8de7841a1cb3a63af67c63f3.tar.gz
minetest-de4c2e4250d3071a8de7841a1cb3a63af67c63f3.tar.bz2
minetest-de4c2e4250d3071a8de7841a1cb3a63af67c63f3.zip
ServerMap saving: cleanups (#6274)
* remove sector meta loading/saving from files which targets dead code (differs_from_disk is always empty) * this remove empty ServerMapSector and ClientMapSector, remove MapSector childs
Diffstat (limited to 'src/debug.cpp')
0 files changed, 0 insertions, 0 deletions
LITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef THREADING_EVENT_H #define THREADING_EVENT_H #if __cplusplus >= 201103L #include <condition_variable> #include "threading/mutex.h" #include "threading/mutex_auto_lock.h" #elif defined(_WIN32) #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif #include <windows.h> #else #include <pthread.h> #endif /** A syncronization primitive that will wake up one waiting thread when signaled. * Calling @c signal() multiple times before a waiting thread has had a chance * to notice the signal will wake only one thread. Additionally, if no threads * are waiting on the event when it is signaled, the next call to @c wait() * will return (almost) immediately. */ class Event { public: Event(); #if __cplusplus < 201103L ~Event(); #endif void wait(); void signal(); private: #if __cplusplus >= 201103L std::condition_variable cv; Mutex mutex; bool notified; #elif defined(_WIN32) HANDLE event; #else pthread_cond_t cv; pthread_mutex_t mutex; bool notified; #endif }; #endif