[Developers] Error in handling sync statements in scheduling groups
Erik Schnetter
schnetter at aei.mpg.de
Thu May 26 06:29:47 CDT 2005
On Thursday 26 May 2005 13:19, Tom Goodale wrote:
> I see the problem now; when the synchronised flag was set, the
> resetting to 0 was not done in ScheduleCallExit. Your solution
> works, but breaks the distinction between the attributes which are
> specific to a schedule item, and the data associated with the state
> of the schedular itself; I think a better solution would have been
> to move the
>
> data->synchronised = 0
>
> statement on line 2268 to outside the if statement. Can you check if
> this fixes your problem ?
I haven't tested it, but I think it would. However, this seems like a
work-around, because the same variable "synchronised" is used for
multiple schedule items that are active at the same time in the
recursive walk of the schedule tree. Setting it to false there would
cure the problem, but would break potential future code that might
actually synchronise the schedule group's variables.
Furthermore, there is also the field "done_entry", which is also about
the state of the scheduler and not about the particular schedule item.
(Think of recursive scheduling.) These two fields are very similar and
should be treated the same way.
If you want to move both the "done_entry" and "synchronised" fields into
the t_sched_data structure, then it would be necessary to have one of
these data objects per active schedule item, and not only one globally.
Should I implement a stack of these, where the CallEntry and CallExit
push and pop? That would be the cleanest solution in my view.
-erik
--
Erik Schnetter <schnetter at aei.mpg.de> http://www.aei.mpg.de/~eschnett/
My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from www.keyserver.net.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.cactuscode.org/pipermail/developers/attachments/20050526/b137bd24/attachment-0002.bin
More information about the Developers
mailing list