Remove custom lock types in favor of native C++11 mutexes

No longer using RAII wrappers around pthread_mutex_t and pthread_cond_t
in favor of the C++11 std::mutex, std::recursive_mutex, and
std::condition_variable data types.
This commit is contained in:
Mahmoud Al-Qudsi
2017-08-18 14:26:35 -05:00
parent b1ac07a178
commit e76c1fd139
18 changed files with 74 additions and 250 deletions

View File

@@ -48,11 +48,7 @@ file_access_attempt_t access_file(const wcstring &path, int mode) {
autoload_t::autoload_t(const wcstring &env_var_name_var,
command_removed_function_t cmd_removed_callback)
: lock(), env_var_name(env_var_name_var), command_removed(cmd_removed_callback) {
pthread_mutex_init(&lock, NULL);
}
autoload_t::~autoload_t() { pthread_mutex_destroy(&lock); }
: lock(), env_var_name(env_var_name_var), command_removed(cmd_removed_callback) {}
void autoload_t::entry_was_evicted(wcstring key, autoload_function_t node) {
// This should only ever happen on the main thread.