Mercurial > MadButterfly
comparison include/mb_backend.h @ 990:8dd42310dd79 refine_backend_if
Change signature of callback for IO and timer manager
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Mon, 22 Nov 2010 00:42:29 +0800 |
parents | c39d14139ca5 |
children | 1882700bb4b9 |
comparison
equal
deleted
inserted
replaced
989:7a727ba3f441 | 990:8dd42310dd79 |
---|---|
70 */ | 70 */ |
71 enum MB_IO_TYPE {MB_IO_DUMMY, MB_IO_R, MB_IO_W, MB_IO_RW}; | 71 enum MB_IO_TYPE {MB_IO_DUMMY, MB_IO_R, MB_IO_W, MB_IO_RW}; |
72 | 72 |
73 /*! \brief Function signature of callback functions for IO requests. | 73 /*! \brief Function signature of callback functions for IO requests. |
74 */ | 74 */ |
75 typedef void (*mb_IO_cb_t)(int fd, MB_IO_TYPE type, void *data); | 75 typedef void (*mb_IO_cb_t)(int hdl, int fd, MB_IO_TYPE type, void *data); |
76 | 76 |
77 /*! \brief IO Manager | 77 /*! \brief IO Manager |
78 */ | 78 */ |
79 struct _mb_IO_man { | 79 struct _mb_IO_man { |
80 int (*reg)(struct _mb_IO_man *io_man, | 80 int (*reg)(struct _mb_IO_man *io_man, |
92 }; | 92 }; |
93 typedef struct _mb_IO_factory mb_IO_factory_t; | 93 typedef struct _mb_IO_factory mb_IO_factory_t; |
94 | 94 |
95 /*! \brief Function signature of callback functions for timers. | 95 /*! \brief Function signature of callback functions for timers. |
96 */ | 96 */ |
97 typedef void (*mb_timer_cb_t)(mbsec_t sec, mbusec_t usec, void *data); | 97 typedef void (*mb_timer_cb_t)(int hdl, mbsec_t sec, mbusec_t usec, void *data); |
98 | 98 |
99 /*! \brief Timer manager | 99 /*! \brief Timer manager |
100 */ | 100 */ |
101 struct _mb_timer_man { | 101 struct _mb_timer_man { |
102 int (*timeout)(struct _mb_timer_man *tm_man, | 102 int (*timeout)(struct _mb_timer_man *tm_man, |