Author: adrian.chadd
Date: Tue Mar 31 07:41:53 2009
New Revision: 13894
Modified:
branches/LUSCA_HEAD/libiapp/disk.c
Log:
Document more of the public legacy disk functions.
Modified: branches/LUSCA_HEAD/libiapp/disk.c
==============================================================================
--- branches/LUSCA_HEAD/libiapp/disk.c (original)
+++ branches/LUSCA_HEAD/libiapp/disk.c Tue Mar 31 07:41:53 2009
@@ -103,9 +103,23 @@
fde_disk = xcalloc(Squid_MaxFD, sizeof(struct _fde_disk));
}
-/*
- * opens a disk file specified by 'path'. This function always
- * blocks! There is no callback.
+/*!
+ * @function
+ * file_open
+ *
+ * @abstract
+ * Open the given file for file-based IO.
+ *
+ * @discussion
+ * These calls were initially non-blocking but at some point in the
+ * past they were converted to "blocking" only with no completion
+ * callback available.
+ *
+ * Any file opened in this manner will be closed on a fork/exec pair.
+ *
+ * @param path path to file toopen
+ * @param mode O_RDONLY, O_WRONLY, O_RDWR, O_APPEND, etc
+ * @return -1 on error, file descriptor of new file on success.
*/
int
file_open(const char *path, int mode)
@@ -130,6 +144,15 @@
/* close a disk file. */
+/*!
+ * @function
+ * file_close
+ *
+ * @abstract
+ * Flush queued data and close the file filedescriptor
+ *
+ * @param fd Filedescriptor to close; must be open.
+ */
void
file_close(int fd)
{
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"lusca-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/lusca-commit?hl=en
-~----------~----~----~----~------~----~------~--~---