cygserver: Speed up non-debug scenario
_log/_vlog were always called so we always had a function call hit even if we're not debugging. Expand on the debugging macros so the decision to call _log/_vlog is done in the caller already. Also, make a log level difference between syscall_printf and system_printf. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
@ -82,12 +82,12 @@ public:
|
||||
bool is_active () const { return _exit_status == STILL_ACTIVE; }
|
||||
|
||||
void _hold (const char *file, int line) {
|
||||
_log (file, line, LOG_DEBUG, "Try hold(%lu)", _cygpid);
|
||||
_debug (file, line, "Try hold(%lu)", _cygpid);
|
||||
EnterCriticalSection (&_access);
|
||||
_log (file, line, LOG_DEBUG, "holding (%lu)", _cygpid);
|
||||
_debug (file, line, "holding (%lu)", _cygpid);
|
||||
}
|
||||
void _release (const char *file, int line) {
|
||||
_log (file, line, LOG_DEBUG, "leaving (%lu)", _cygpid);
|
||||
_debug (file, line, "leaving (%lu)", _cygpid);
|
||||
LeaveCriticalSection (&_access);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user