PERFORCE change 102025 for review
John Baldwin
jhb at FreeBSD.org
Thu Jul 20 20:26:27 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=102025
Change 102025 by jhb at jhb_mutex on 2006/07/20 20:25:37
Document what fdclose() does as it wasn't obvious to me when I looked
at it back when doing kern_accept() last week.
Affected files ...
.. //depot/projects/smpng/sys/kern/kern_descrip.c#95 edit
Differences ...
==== //depot/projects/smpng/sys/kern/kern_descrip.c#95 (text+ko) ====
@@ -1756,6 +1756,14 @@
FILEDESC_UNLOCK(fdp);
}
+/*
+ * If a specific file object occupies a specific file descriptor,
+ * close the file descriptor entry and drop a reference on the file
+ * object. This is a convenience function to handle a subsequent
+ * error in a function that calls falloc() that handles the race that
+ * another thread might have closed the file descriptor out from under
+ * the thread creating the file object.
+ */
void
fdclose(struct filedesc *fdp, struct file *fp, int idx, struct thread *td)
{
More information about the p4-projects
mailing list