Remove file locking debug cruft.

This commit is contained in:
Alfred Perlstein 2002-01-13 12:01:29 +00:00
parent 426da3bcfb
commit 297f86dcd2
2 changed files with 0 additions and 28 deletions

View File

@ -131,22 +131,8 @@ int fdrop __P((struct file *fp, struct thread *td));
int fdrop_locked __P((struct file *fp, struct thread *td));
/* Lock a file. */
/*#define FILE_LOCK_DEBUG*/
#ifdef FILE_LOCK_DEBUG
#define FILE_LOCK(f) \
do { \
printf("FLCK: %p %s %d\n", &(f)->f_mtx, __FILE__, __LINE__); \
mtx_lock(&(f)->f_mtx); \
} while (0)
#define FILE_UNLOCK(f) \
do { \
printf("FREL: %p %s %d\n", &(f)->f_mtx, __FILE__, __LINE__); \
mtx_unlock(&(f)->f_mtx); \
} while (0)
#else
#define FILE_LOCK(f) mtx_lock(&(f)->f_mtx)
#define FILE_UNLOCK(f) mtx_unlock(&(f)->f_mtx)
#endif
#define FILE_LOCKED(f) mtx_owned(&(f)->f_mtx)
#define FILE_LOCK_ASSERT(f, type) mtx_assert(&(f)->f_mtx, (type))

View File

@ -131,22 +131,8 @@ SLIST_HEAD(sigiolst, sigio);
#ifdef _KERNEL
/* Lock a file descriptor table. */
/*#define FILEDESC_LOCK_DEBUG*/
#ifdef FILEDESC_LOCK_DEBUG
#define FILEDESC_LOCK(fd) \
do { \
printf("FD_LCK: %p %s %d\n", &(fd)->fd_mtx, __FILE__, __LINE__); \
mtx_lock(&(fd)->fd_mtx); \
} while (0)
#define FILEDESC_UNLOCK(fd) \
do { \
printf("FD_REL: %p %s %d\n", &(fd)->fd_mtx, __FILE__, __LINE__); \
mtx_unlock(&(fd)->fd_mtx); \
} while (0)
#else
#define FILEDESC_LOCK(fd) mtx_lock(&(fd)->fd_mtx)
#define FILEDESC_UNLOCK(fd) mtx_unlock(&(fd)->fd_mtx)
#endif
#define FILEDESC_LOCKED(fd) mtx_owned(&(fd)->fd_mtx)
#define FILEDESC_LOCK_ASSERT(fd, type) mtx_assert(&(fd)->fd_mtx, (type))