/* virtual */ void IOCommandGate::disable() { if (workLoop && !workLoop->inGate()) OSReportWithBacktrace("IOCommandGate::disable() called when not gated"); super::disable(); }
void IOMapper::waitForSystemMapper() { sMapperLock.lock(); while ((uintptr_t) IOMapper::gSystem & kWaitMask) { OSReportWithBacktrace("waitForSystemMapper"); sMapperLock.sleep(&IOMapper::gSystem); } sMapperLock.unlock(); }
/** * __ntfs_error - output an error to the console * @function: name of function outputting the error * @mp: mounted ntfs file system * @fmt: error string containing format specifications * @...: a variable number of arguments specified in @fmt * * Outputs an error to the console for the mounted ntfs file system described * by @mp. * * @fmt and the corresponding @... is printf style format string containing * the error string and the corresponding format arguments, respectively. * * @function is the name of the function from which __ntfs_error is being * called. * * Note, you should be using debug.h::ntfs_error(@mp, @fmt, @...) instead * as this provides the @function parameter automatically. */ void __ntfs_error(const char *function, struct mount *mp, const char *fmt, ...) { va_list args; int flen = 0; if (function) flen = strlen(function); mtx_lock_spin(&ntfs_err_buf_lock); va_start(args, fmt); vsnprintf(ntfs_err_buf, sizeof(ntfs_err_buf), fmt, args); va_end(args); if (mp) printf("NTFS-fs error (device %s, pid %d): %s(): %s\n", vfs_statfs(mp)->f_mntfromname, proc_selfpid(), flen ? function : "", ntfs_err_buf); else printf("NTFS-fs error (pid %d): %s(): %s\n", proc_selfpid(), flen ? function : "", ntfs_err_buf); #ifdef DEBUG OSReportWithBacktrace(""); #endif mtx_unlock_spin(&ntfs_err_buf_lock); }