TPL_IGNORE(cb);
if (cond & G_IO_IN) {
+ ssize_t s;
+ uint64_t message = 0;
+
+ if (gsource->is_eventfd) {
+ s = read(gsource->fd, &message, sizeof(uint64_t));
+ if (s != sizeof(uint64_t)) {
+ TPL_ERR("Failed to read from event_fd(%d)",
+ gsource->fd);
+ }
+ }
+
if (gsource->gsource_funcs && gsource->gsource_funcs->dispatch)
- ret = gsource->gsource_funcs->dispatch(gsource);
+ ret = gsource->gsource_funcs->dispatch(gsource, message);
if (gsource->type == SOURCE_TYPE_FINALIZER) {
tpl_gsource *del_source = (tpl_gsource *)data;
struct _tpl_gsource_functions {
tpl_bool_t (*prepare) (tpl_gsource *source);
tpl_bool_t (*check) (tpl_gsource *source);
- tpl_bool_t (*dispatch) (tpl_gsource *source);
+ tpl_bool_t (*dispatch) (tpl_gsource *source, uint64_t message);
void (*finalize) (tpl_gsource *source);
};
}
static tpl_bool_t
-__thread_func_tdm_dispatch(tpl_gsource *gsource)
+__thread_func_tdm_dispatch(tpl_gsource *gsource, uint64_t message)
{
tpl_wl_egl_display_t *wl_egl_display = NULL;
tdm_error tdm_err = TDM_ERROR_NONE;
+ TPL_IGNORE(message);
+
wl_egl_display = (tpl_wl_egl_display_t *)tpl_gsource_get_data(gsource);
if (!wl_egl_display) {
TPL_ERR("Failed to get wl_egl_display from gsource(%p)", gsource);