summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnand Avati <avati@redhat.com>2013-08-22 15:02:00 -0700
committerVijay Bellur <vbellur@redhat.com>2013-08-23 03:37:23 -0700
commitd3bbbbb158942a974414b021e3320c72c49d0cfe (patch)
tree42cf95d45b93276a64900671e36a641dffed91d0
parentd64df6a92c2492812ef7c23cc133f5d7a113ec42 (diff)
gfapi: Add description of glfs_io_cbk function as a comment
No code change, just add a comment describing the callback function type. Change-Id: I3a5c5b3d3fe042b4f535963dd477806832c15704 BUG: 839950 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5696 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r--api/src/glfs.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/api/src/glfs.h b/api/src/glfs.h
index d9c1202cd..519a04036 100644
--- a/api/src/glfs.h
+++ b/api/src/glfs.h
@@ -304,6 +304,29 @@ glfs_t *glfs_from_glfd (glfs_fd_t *fd);
int glfs_set_xlator_option (glfs_t *fs, const char *xlator, const char *key,
const char *value);
+/*
+
+ glfs_io_cbk
+
+ The following is the function type definition of the callback
+ function pointer which has to be provided by the caller to the
+ *_async() versions of the IO calls.
+
+ The callback function is called on completion of the requested
+ IO, and the appropriate return value is returned in @ret.
+
+ In case of an error in completing the IO, @ret will be -1 and
+ @errno will be set with the appropriate error.
+
+ @ret will be same as the return value of the non _async() variant
+ of the particular call
+
+ @data is the same context pointer provided by the caller at the
+ time of issuing the async IO call. This can be used by the
+ caller to differentiate different instances of the async requests
+ in a common callback function.
+*/
+
typedef void (*glfs_io_cbk) (glfs_fd_t *fd, ssize_t ret, void *data);
// glfs_{read,write}[_async]