From d8376338faedc3a36bea3355c1c1d1f93bee2c46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20O=2E=20Sel=C3=A5sdal?= Date: Tue, 2 Jul 2013 21:21:27 +0200 Subject: [PATCH] Improve doxygen comments --- include/ucore/iomux.h | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/include/ucore/iomux.h b/include/ucore/iomux.h index 7f8c2f7..20a64cb 100644 --- a/include/ucore/iomux.h +++ b/include/ucore/iomux.h @@ -43,6 +43,9 @@ struct IOMuxFD { }; /** Creates a new IOMux. + * + * @param type the underlying implementation to use @see IOMUX_TYPE + * @return Newly allocated IOMux. NULL if memory allocation fails. */ struct IOMux *iomux_create(enum IOMUX_TYPE type); @@ -58,19 +61,27 @@ struct IOMux *iomux_create_ex(enum IOMUX_TYPE type, struct UCoreClock *uclock); void iomux_delete(struct IOMux *mux); /** Runs the event loop of the mux - * returns if the number of file descriptors and timers are 0 or + * + * @return if the number of file descriptors and timers are 0 or * an error occurs */ int iomux_run(struct IOMux *mux); -/* Adds a file descriptor to the watch set, - * returns 0 on success, an errno value on error */ +/* Adds a file descriptor to the watch set. + * The file descriptor integer value must reside in only + * one struct IOMuxFD. Adding e.g. the same file descriptor + * in 2 different struct IOMuxFD, one for read events and one for + * write events is not supported. + * + * @return 0 on success, an errno value on error + */ int iomux_register_fd(struct IOMux *mux, struct IOMuxFD *fd); /** Removes the file descriptor*/ int iomux_unregister_fd(struct IOMux *mux, struct IOMuxFD *fd); /** Updates the events to watch for in fd->what - * returns 0 on success, an errno value on error */ + * @return 0 on success, an errno value on error + */ int iomux_update_events(struct IOMux *mux, struct IOMuxFD *fd); @@ -100,7 +111,7 @@ int iomux_update_events(struct IOMux *mux, struct IOMuxFD *fd); iomux_update_events((mux), (fd));\ }) -/** Returns a UCTimer instance tied to this mux. +/** @return a UCTimer instance tied to this mux. * Used to schedule timers within this mux. */ struct UCTimers *iomux_get_timers(struct IOMux *mux);