Slide 1 Slide 2 Slide 3 Slide 4 Slide 5 Slide 6 Slide 7 Slide 8 Slide 9 Slide 10 Slide 11 Product List
SYS/BIOS Semaphores Slide 9

Shown here is the runtime API of the SYS/BIOS Task module and most importantly, how to create a task during runtime. If one looks at the code snippet shown here, there are 3 different variables. The first two are types defined by the Task module itself, the first being a structure that holds all of the various task parameters. The second variable is used to store the handle of the task that will be created. By calling Task_Params_init(), one can fill the params structure with all of the default parameter values. One can then easily update the parameters that one wants with different values (in this case the priority and stack size of the task), while not worrying about the others. The programmer is also setting up an error block variable so that if the create failed, one could find out more information on why it failed. Finally, one calls Task_create() which will instantiate the task instance and return back the handle to the new task. Also shown here on this slide is a summary of the other API calls used to control a task.

PTM Published on: 2012-07-19