THREAD_LOCK
#define THREAD_LOCK() if (__isthreaded) _pthread_mutex_lock(&logname_mutex)
#define THREAD_LOCK() if (__isthreaded) _pthread_mutex_lock(&pidlist_mutex)
#define THREAD_LOCK() \
#define THREAD_LOCK() if (__isthreaded) _SPINLOCK(&thread_lock)