Hello, welcome back.
In this lesson, we shall take a look at the the free Archos task creation function.
Over here we have a function prototype or a function header with a number of argument and one return
type.
The name of the function is task create.
And this returns a base type.
We know that already from even its name.
If we just saw Exit without indicating its returns, a base type, who would know that this is a prefix
for base type?
And we find this function in the task that sifa of for we studied earlier.
This function takes six documents.
The first argument is the task code or the task function, meaning dysfunction here is for creating
a task.
Remember we said the task needs at least the program to execute as well as the stack over here.
That program is known as the task code.
So we passed the name of the function to execute or the name of the function.
This task must execute pass it as the first argument here to the second argument is a character, Ari,
and this allows us to assign a string as the name of this particular task, and this is useful in debugging.
And then the next the next document documents.
Number three is the stack that you can think of this as the stack size.
And then following that, we have this argument known as the parameters, this allows us to pass parameters
to the task function.
Remember the task function or the task code is just like any function, just like our function, except
document.
We can pass the parameter here, end up parameter becomes the document of this task function.
We shall see how this is done in code.
Right.
And then following this argument, number five is the priority of the task we wish to create.
So if we have multiple tasks and we're not running around dropping scheduling method, we may want to
give the priority here.
And then finally, this is a variable to store the handle for the created task.
So the handle allows us to to sort of configure the task at runtime.
If you ever want to have access to this task and then make some configuration we would use to handle.
So we would have to declare a variable and store the handle of this task, this task that we are creating
into that variable.
Right.
So before we conclude this, let's take a look at the nature of the task function.
The task function is what is written here as task code.
OK, document number one.
So it's a simple function that takes some parameters.
Right.
And we see how to make use of this.
OK, so this order is we've taken a look at the X task creates function, which is going to be a compulsory
function in every project because we need to create a task.
Right.
This is what it looks like.
I've seen the next lesson of a nice day.