From d3bbbbb158942a974414b021e3320c72c49d0cfe Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Thu, 22 Aug 2013 15:02:00 -0700 Subject: 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 Reviewed-on: http://review.gluster.org/5696 Reviewed-by: Vijay Bellur Tested-by: Vijay Bellur --- api/src/glfs.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/api/src/glfs.h b/api/src/glfs.h index d9c1202c..519a0403 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] -- cgit