1 This example is a very simple example, showing how to use the Kokyu
2 dispatcher to dispatch command objects in a FIFO manner. The test
3 configures the Kokyu dispatcher with 3 FIFO lanes, each having a
4 different priority. Typically this would be done by an RMS scheduler
5 which assigns priorities to tasks based on the rate of tasks. To
6 ensure that the command objects enqueued in the dispatcher are
7 dispatched in the correct order, we enqueue the command objects and
8 *then* activate the dispatcher. Only when the dispatcher is activated,
9 the thread watching each dispatch queue starts running.
13 ./test -p<fifo|rr|other>
15 The following is the expected output
17 Priority of command1 is 2
18 Priority of command2 is 3
19 Priority of command3 is 1
24 Note that a lower number means a higher priority for the task.