aboutsummaryrefslogtreecommitdiff
path: root/src/script/cpp_api/s_security.cpp
Commit message (Expand)AuthorAge
* Security: Fix resolving of some relative pathsShadowNinja2016-12-20
* Mod security: Allow read-only access to all mod pathsShadowNinja2016-12-20
* Fix secure io.linesShadowNinja2016-11-24
* Fix secure io.open without modeShadowNinja2016-11-24
* Fix memory leak in ::safeLoadFile (#4730)Zeno-2016-11-05
* couple of memory leaks fixes.David Carlier2016-08-10
* Remove unused code in s_security.cpp (#4172)Zeno-2016-05-30
* Remove debug.getupvalue from the Lua sandbox whitelistShadowNinja2016-03-03
* Use numeric indices and raw table access with LUA_REGISTRYINDEXKahrl2015-08-27
* dofile error reporting for syntax errorsest312015-06-12
* Fix Windows build, clean up included headersSmallJoker2015-05-22
* Add mod securityShadowNinja2015-05-16
an class="hl ppc">#define THREADING_EVENT_H #include "threads.h" #if USE_CPP11_MUTEX #include <condition_variable> #include "threading/mutex.h" #include "threading/mutex_auto_lock.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(); #ifndef USE_CPP11_MUTEX ~Event(); #endif void wait(); void signal(); private: #if USE_CPP11_MUTEX std::condition_variable cv; Mutex mutex; bool notified; #elif USE_WIN_MUTEX HANDLE event; #else pthread_cond_t cv; pthread_mutex_t mutex; bool notified; #endif }; #endif