diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-04-21 20:08:08 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-04-21 20:08:44 -0700 |
commit | 0e3eb38f1185078662ee44c3120326cdb88274b4 (patch) | |
tree | f16b3222ca8fe4933f988f02e6f1bc314482d756 /common.cpp | |
parent | dc23af6b32d4b89eea9ad904495ac5507b8835cc (diff) |
Improved fork reporting
Made autosuggestion work properly for tilde expansion
Diffstat (limited to 'common.cpp')
-rw-r--r-- | common.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1961,7 +1961,7 @@ void append_path_component(wcstring &path, const wcstring &component) } extern "C" { -__attribute__((noinline)) void debug_thread_error(void) {} +__attribute__((noinline)) void debug_thread_error(void) { while (1) sleep(9999999); } } @@ -2015,11 +2015,11 @@ void assert_is_background_thread(const char *who) } } -void assert_is_locked(void *vmutex, const char *who) +void assert_is_locked(void *vmutex, const char *who, const char *caller) { pthread_mutex_t *mutex = static_cast<pthread_mutex_t*>(vmutex); if (0 == pthread_mutex_trylock(mutex)) { - fprintf(stderr, "Warning: %s is not locked when it should be. Break on debug_thread_error to debug.\n", who); + fprintf(stderr, "Warning: %s is not locked when it should be in '%s'. Break on debug_thread_error to debug.\n", who, caller); debug_thread_error(); pthread_mutex_unlock(mutex); } |