I'll try to explain..
A "dispatch" will dispatch a certain message to all receivers. This is
what the fusionee_send_message below is doing.
You have the option to receive a single message when all these messages
have been processed. If you use this option, "dispatch" will be unequal
0, and dispatch->count will contain the number of non-handled messages.
If this is 0, the single message will obviously be send off right away:
this is the fusion_call_execute you see below. Otherwise,
dispatch_callback is called for each completed message, and when
dispatch->count is 0 the final single message is send from this callback.
hth
Niels
Sorin Otescu wrote:
Hi,
I'm having trouble understanding when a dispatch callback is called.
It should be called after all fusionees have received the message, but
this code in reactor.c:
if (dispatch) {
dispatch->count++;
ret =
fusionee_send_message(dev, fusionee,
node->fusion_id, FMT_REACTOR,
reactor->entry.id, channel,
msg_size, msg_data,
dispatch_callback, dispatch,
reactor->entry.id);
} else
ret =
fusionee_send_message(dev, fusionee,
node->fusion_id, FMT_REACTOR,
reactor->entry.id, channel,
msg_size, msg_data, NULL,
NULL, 0);
which is called for every eligible fusionee, and this code:
if (dispatch && !dispatch->count) {
FusionCallExecute execute;
execute.call_id = dispatch->call_id;
execute.call_arg = dispatch->call_arg;
execute.call_ptr = dispatch->call_ptr;
fusion_call_execute(dev, NULL, &execute);
kfree(dispatch);
}
which should theoretically call the dispatch callback. The problem is
that the callback is executed only when dispatch->count is 0 (no
fusionees exist) ! My understanding is that it should be the other way
around. Am I missing something?
Sorin
_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev
--
.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/ |
"------------------------------------------"
_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev