Add doxygen groups

This commit is contained in:
Nils O. Selåsdal
2013-07-31 03:37:50 +02:00
parent 679b4b12e5
commit 13108f1f48
4 changed files with 46 additions and 7 deletions
+29 -3
View File
@@ -2,7 +2,18 @@
#define IO_MUX_H_
#include "timers.h"
/** @addtogroup IOMux
* @{
* The IOMux is an I/O multiplexer, implementing a main eventloop.
* The event loop can be used to register callbacks for activity on
* file descriptors such as sockets and pips, and for timers.
*
* The IOMux is backed either by the select() system call, or the epoll
* facility on Linux. Several IOMuxes can run in different threads concurrently,
* but note that the IOMux itself is not thread safe so operations in one thread
* cannot work on an IOMux running in another thread.
*
* */
#ifdef __cplusplus
extern "C" {
#endif
@@ -22,9 +33,20 @@ enum IOMUX_TYPE {
IOMUX_TYPE_EPOLL
};
/** Opaque struct */
/** The IOMux used to issue mux operations. This is to be treated as an opaque
* handle. Use iomux_create() or iomux_create_ex() to create an IOMux, register
* callbakcs, and call iomux_run() to process the events
*/
struct IOMux;
struct IOMuxFD;
/** Callback function used in struct IOMuxFD
* @param mux the mux that issued the callback.
* @param fd the file desciptor structure.
* @param event A bitmask of the MUX_EV_XX values. Both a read and a write event
* might be signalled in the same callback
*/
typedef void (*iomux_cb)(struct IOMux *mux, struct IOMuxFD *fd, unsigned int event);
/** Represents a watched file descriptor */
@@ -76,7 +98,10 @@ int iomux_run(struct IOMux *mux);
*/
int iomux_register_fd(struct IOMux *mux, struct IOMuxFD *fd);
/** Removes the file descriptor*/
/** Removes the file descriptor
*
* @return 0 on success, an errno value on error
*/
int iomux_unregister_fd(struct IOMux *mux, struct IOMuxFD *fd);
/** Updates the events to watch for in fd->what
@@ -120,5 +145,6 @@ struct UCTimers *iomux_get_timers(struct IOMux *mux);
}
#endif
/** @} (addtogroup)*/
#endif