Conversation
edwardalee
left a comment
There was a problem hiding this comment.
Looks promising. A few questions included. Also, there is not enough documentation to know how to use it. Ideally, it would explain how to create (manually) a quasi-static schedule somewhere so that one could use these extensions.
| // lf_mutex_lock(&_lf_sched_instance->_lf_sched_semaphore->mutex); | ||
| // lf_cond_wait(&_lf_sched_instance->_lf_sched_semaphore->cond, &_lf_sched_instance->_lf_sched_semaphore->mutex); | ||
| // lf_mutex_unlock(&_lf_sched_instance->_lf_sched_semaphore->mutex); | ||
| lf_cond_wait(&_lf_sched_instance->_lf_sched_array_of_conds[0], &mutex); |
There was a problem hiding this comment.
Should this index be the worker number rather than 0?
There was a problem hiding this comment.
Although the field is called _lf_sched_array_of_conds, the current implementation only uses one condition variable to coordinate time advancement. An array is used here so that a future scheduler implementation that needs multiple condition variables can still use this field.
There was a problem hiding this comment.
A comment in the code about this would be helpful.
0bfa648 to
c811341
Compare
|
What is the relationship between this PR and #241? |
This is a draft PR for the C runtime of the quasi-static (QS) scheduler. The design of the scheduler follows the one in this report and (mostly) in this discussion thread.
This scheduler runtime concurrently must be compiled against a
schedule.hfile, which should be generated by a static schedule generator inlfc. A preliminary version of the schedule generator is implemented using Uclid5 on this branch.Here are the outstanding TODOs in order to make this scheduler able to be merged in:
An important TODO after a more efficient schedule generator is merged into
lingua-franca:More research-related items:
branchinstruction in the instruction set.Use cases: