User Tools

Site Tools


realtime:documentation:howto:applications:cyclic

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
realtime:documentation:howto:applications:cyclic [2017/05/19 15:41]
jogness comment spelling
realtime:documentation:howto:applications:cyclic [2017/05/19 16:00]
jogness return NULL for completeness
Line 14: Line 14:
  
 Any mechanism for implementing a cyclic task can be divided into the following parts: Any mechanism for implementing a cyclic task can be divided into the following parts:
-  * periodic_task_init(): ​initialization ​code for doing things like requesting timers, initializing variables, setting timer periods.+  * periodic_task_init(): ​Initialization ​code for doing things like requesting timers, initializing variables, setting timer periods.
   * do_rt_task():​ The real time task is done here.   * do_rt_task():​ The real time task is done here.
-  * wait_rest_of_period():​ After the task is done, wait for the rest of the period. The assumption here is the task less time to complete compared to the period length. +  * wait_rest_of_period():​ After the task is done, wait for the rest of the period. The assumption here is the task requires ​less time to complete compared to the period length. 
-  * struct period_info: ​this is a struct which will be used to pass around data required by the above mentioned functions.+  * struct period_info: ​This is a struct which will be used to pass around data required by the above mentioned functions.
  
 The stub for the real time task will look like: The stub for the real time task will look like:
Line 31: Line 31:
                 wait_rest_of_period(&​pinfo);​                 wait_rest_of_period(&​pinfo);​
         }         }
 +        ​
 +        return NULL;
 } }
 </​code>​ </​code>​
realtime/documentation/howto/applications/cyclic.txt · Last modified: 2017/06/20 14:15 by anna-maria