Fix macros

This commit is contained in:
Nils O. Selåsdal
2013-12-24 14:11:11 +01:00
parent ae8e53bd65
commit a147b868c0
+7 -11
View File
@@ -110,34 +110,30 @@ int iomux_unregister_fd(struct IOMux *mux, struct IOMuxFD *fd);
*/
int iomux_update_events(struct IOMux *mux, struct IOMuxFD *fd);
/** Retreive the UCoreClock associated with the IOMux.
* Either a suitable internal clock is provided, or the
* same clock as created by iomux_create_ex.
*/
struct UCoreClock *iomux_get_clock(struct IOMux *mux);
/**
* Convenience macro for setting the new event
*/
#define iomux_set_event(mux, fd, what)\
#define iomux_set_event(mux, fd, what_)\
({\
(fd)->what = (what);\
(fd)->what = (what_);\
iomux_update_events((mux), (fd));\
})
/**
* Convenience macro for clearing the new event
*/
#define iomux_clear_event(mux, fd, what)\
#define iomux_clear_event(mux, fd, what_)\
({\
(fd)->what &= ~(what);\
(fd)->what &= ~(what_);\
iomux_update_events((mux), (fd));\
})
/**
* Convenience macro for adding the new event to the existing events
*/
#define iomux_add_event(mux, fd, what)\
#define iomux_add_event(mux, fd, what_)\
({\
(fd)->what &= (what);\
(fd)->what &= (what_);\
iomux_update_events((mux), (fd));\
})