summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authortanimura <tanimura@FreeBSD.org>2002-03-29 11:26:05 +0000
committertanimura <tanimura@FreeBSD.org>2002-03-29 11:26:05 +0000
commit9ae6d1242c5a218cbb27f1a3ed8a9014412bbf80 (patch)
treed3b6c61dddfab884a7eb3c507182faa4d874302b /sys
parent84c21f1d8ff69f47f8e2bef01392d5b39cf9ce02 (diff)
downloadFreeBSD-src-9ae6d1242c5a218cbb27f1a3ed8a9014412bbf80.zip
FreeBSD-src-9ae6d1242c5a218cbb27f1a3ed8a9014412bbf80.tar.gz
The description of fd_mtx is "filedesc structure."
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/init_main.c2
-rw-r--r--sys/kern/kern_descrip.c4
-rw-r--r--sys/sys/filedesc.h2
3 files changed, 5 insertions, 3 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index d64a965..afad11d 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -359,7 +359,7 @@ proc0_init(void *dummy __unused)
/* Create the file descriptor table. */
fdp = &filedesc0;
p->p_fd = &fdp->fd_fd;
- mtx_init(&fdp->fd_fd.fd_mtx, "struct filedesc", MTX_DEF);
+ mtx_init(&fdp->fd_fd.fd_mtx, FILEDESC_LOCK_DESC, MTX_DEF);
fdp->fd_fd.fd_refcnt = 1;
fdp->fd_fd.fd_cmask = cmask;
fdp->fd_fd.fd_ofiles = fdp->fd_dfiles;
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index f866707..b97386d 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -1167,7 +1167,7 @@ fdinit(td)
MALLOC(newfdp, struct filedesc0 *, sizeof(struct filedesc0),
M_FILEDESC, M_WAITOK | M_ZERO);
- mtx_init(&newfdp->fd_fd.fd_mtx, "filedesc structure", MTX_DEF);
+ mtx_init(&newfdp->fd_fd.fd_mtx, FILEDESC_LOCK_DESC, MTX_DEF);
FILEDESC_LOCK(&newfdp->fd_fd);
newfdp->fd_fd.fd_cdir = fdp->fd_cdir;
if (newfdp->fd_fd.fd_cdir)
@@ -1228,7 +1228,7 @@ fdcopy(td)
bcopy(fdp, newfdp, sizeof(struct filedesc));
FILEDESC_UNLOCK(fdp);
bzero(&newfdp->fd_mtx, sizeof(newfdp->fd_mtx));
- mtx_init(&newfdp->fd_mtx, "filedesc structure", MTX_DEF);
+ mtx_init(&newfdp->fd_mtx, FILEDESC_LOCK_DESC, MTX_DEF);
if (newfdp->fd_cdir)
VREF(newfdp->fd_cdir);
if (newfdp->fd_rdir)
diff --git a/sys/sys/filedesc.h b/sys/sys/filedesc.h
index ebb478d..160bda2 100644
--- a/sys/sys/filedesc.h
+++ b/sys/sys/filedesc.h
@@ -132,6 +132,8 @@ SLIST_HEAD(sigiolst, sigio);
#ifdef _KERNEL
+#define FILEDESC_LOCK_DESC "filedesc structure"
+
/* Lock a file descriptor table. */
#define FILEDESC_LOCK(fd) mtx_lock(&(fd)->fd_mtx)
#define FILEDESC_UNLOCK(fd) mtx_unlock(&(fd)->fd_mtx)
OpenPOWER on IntegriCloud