Add doxygen groups
This commit is contained in:
@@ -3,7 +3,10 @@
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
|
||||
/** @addtogroup Timers
|
||||
* @{
|
||||
* Clock abstractions
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -117,5 +120,6 @@ void uc_settable_clock_set(struct UCoreSettableClock *uclock,
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} (addtogroup) */
|
||||
#endif
|
||||
|
||||
|
||||
+29
-3
@@ -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
|
||||
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
#include <stdint.h>
|
||||
|
||||
/** Implementation of saturated operation on uintaa_t.
|
||||
* Opaerations are clamped betweehn 0 and UINTaa_MAa instead of
|
||||
* wrapping around*/
|
||||
/** Implementation of saturated operation on uintxx_t.
|
||||
*
|
||||
* Operations are clamped between 0 and UINTxx_MAX instead of
|
||||
* wrapping around.
|
||||
*
|
||||
* multiplication, subtraction and addition operations are provided.*/
|
||||
|
||||
#define UC_SAT_ADD(a, b, type, max_val)\
|
||||
((type)((a) + (b)) >= (a) ? (a) + (b) : (max_val))
|
||||
|
||||
@@ -6,6 +6,11 @@
|
||||
#include <sys/time.h>
|
||||
#include "rbtree.h"
|
||||
|
||||
/** @addtogroup Timers
|
||||
* @{
|
||||
* Timer management for managing timeouts
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -147,4 +152,5 @@ int uc_timers_run(struct UCTimers *timers);
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @{ (addtogroup) */
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user