1
00:00:00,710 --> 00:00:01,650
Hello, welcome back.

2
00:00:02,120 --> 00:00:08,210
In this lesson, we shall take a look at the the free Archos task creation function.

3
00:00:08,570 --> 00:00:14,810
Over here we have a function prototype or a function header with a number of argument and one return

4
00:00:14,810 --> 00:00:15,200
type.

5
00:00:15,650 --> 00:00:18,740
The name of the function is task create.

6
00:00:19,370 --> 00:00:20,830
And this returns a base type.

7
00:00:20,990 --> 00:00:23,230
We know that already from even its name.

8
00:00:23,240 --> 00:00:29,870
If we just saw Exit without indicating its returns, a base type, who would know that this is a prefix

9
00:00:30,230 --> 00:00:31,040
for base type?

10
00:00:31,040 --> 00:00:36,260
And we find this function in the task that sifa of for we studied earlier.

11
00:00:36,830 --> 00:00:38,780
This function takes six documents.

12
00:00:38,810 --> 00:00:46,550
The first argument is the task code or the task function, meaning dysfunction here is for creating

13
00:00:46,550 --> 00:00:47,090
a task.

14
00:00:47,660 --> 00:00:54,200
Remember we said the task needs at least the program to execute as well as the stack over here.

15
00:00:54,230 --> 00:00:56,870
That program is known as the task code.

16
00:00:57,080 --> 00:01:01,590
So we passed the name of the function to execute or the name of the function.

17
00:01:01,610 --> 00:01:08,920
This task must execute pass it as the first argument here to the second argument is a character, Ari,

18
00:01:09,740 --> 00:01:16,220
and this allows us to assign a string as the name of this particular task, and this is useful in debugging.

19
00:01:16,820 --> 00:01:19,910
And then the next the next document documents.

20
00:01:19,910 --> 00:01:24,140
Number three is the stack that you can think of this as the stack size.

21
00:01:25,590 --> 00:01:32,610
And then following that, we have this argument known as the parameters, this allows us to pass parameters

22
00:01:32,610 --> 00:01:33,680
to the task function.

23
00:01:33,690 --> 00:01:39,870
Remember the task function or the task code is just like any function, just like our function, except

24
00:01:39,870 --> 00:01:40,560
document.

25
00:01:41,280 --> 00:01:46,760
We can pass the parameter here, end up parameter becomes the document of this task function.

26
00:01:47,070 --> 00:01:48,870
We shall see how this is done in code.

27
00:01:49,350 --> 00:01:49,740
Right.

28
00:01:49,740 --> 00:01:54,390
And then following this argument, number five is the priority of the task we wish to create.

29
00:01:54,660 --> 00:02:00,540
So if we have multiple tasks and we're not running around dropping scheduling method, we may want to

30
00:02:01,380 --> 00:02:02,720
give the priority here.

31
00:02:03,540 --> 00:02:08,580
And then finally, this is a variable to store the handle for the created task.

32
00:02:09,120 --> 00:02:14,580
So the handle allows us to to sort of configure the task at runtime.

33
00:02:14,580 --> 00:02:20,830
If you ever want to have access to this task and then make some configuration we would use to handle.

34
00:02:21,360 --> 00:02:27,660
So we would have to declare a variable and store the handle of this task, this task that we are creating

35
00:02:27,840 --> 00:02:28,770
into that variable.

36
00:02:29,190 --> 00:02:29,570
Right.

37
00:02:30,060 --> 00:02:34,560
So before we conclude this, let's take a look at the nature of the task function.

38
00:02:34,560 --> 00:02:38,610
The task function is what is written here as task code.

39
00:02:38,760 --> 00:02:40,310
OK, document number one.

40
00:02:40,740 --> 00:02:44,760
So it's a simple function that takes some parameters.

41
00:02:45,150 --> 00:02:45,540
Right.

42
00:02:45,540 --> 00:02:47,070
And we see how to make use of this.

43
00:02:47,570 --> 00:02:55,260
OK, so this order is we've taken a look at the X task creates function, which is going to be a compulsory

44
00:02:55,260 --> 00:02:58,080
function in every project because we need to create a task.

45
00:02:58,410 --> 00:02:58,790
Right.

46
00:02:58,830 --> 00:02:59,930
This is what it looks like.

47
00:03:00,510 --> 00:03:02,370
I've seen the next lesson of a nice day.
