1
00:00:01,420 --> 00:00:02,590
Hello, welcome back.

2
00:00:03,000 --> 00:00:09,940
And the previous lesson, we saw how to change the priority of a task during runtime and this lesson,

3
00:00:09,940 --> 00:00:13,000
we're going to see how to get the priority of the task.

4
00:00:13,510 --> 00:00:18,730
There will be instances where you would want to read the priority of a particular task and decide whether

5
00:00:18,730 --> 00:00:20,380
to decrease it or increase it.

6
00:00:20,870 --> 00:00:26,470
So I'm going to make a copy of this last project, number six over here and paste it over here.

7
00:00:27,640 --> 00:00:29,020
And I'll call this number seven.

8
00:00:33,780 --> 00:00:37,890
By 7:00 or call, it gets in TASC.

9
00:00:39,380 --> 00:00:40,220
Priority.

10
00:00:46,170 --> 00:00:52,470
It's open in, so I'm going to expand this up into the call fuda source, meaning that see?

11
00:00:56,110 --> 00:01:04,090
OK, so we know priority's just a number is a number, so I'm going to declare that you intended to

12
00:01:04,090 --> 00:01:05,800
underscore T variable here.

13
00:01:06,610 --> 00:01:08,670
I call this green priority.

14
00:01:08,680 --> 00:01:12,430
We're going to grab the priority of green storage and this variable.

15
00:01:19,770 --> 00:01:21,500
Like this, right?

16
00:01:21,690 --> 00:01:29,750
So we're going to go to one of our functions and then simply call the task priority, get to function,

17
00:01:30,270 --> 00:01:32,910
so we saw the task priority set.

18
00:01:33,750 --> 00:01:37,680
Now we're going to take a look at the task priority get.

19
00:01:37,920 --> 00:01:42,270
So I'm going to come into red over here and I'll try to get the priority of green.

20
00:01:42,780 --> 00:01:49,860
So come over here and see green underscore priority equals.

21
00:01:54,280 --> 00:01:54,850
Tosk.

22
00:02:01,870 --> 00:02:03,100
For Hillary to get.

23
00:02:05,930 --> 00:02:08,960
And I'm going to pass over here.

24
00:02:10,170 --> 00:02:14,250
I'm going to get past the handful of green, so I see green Honda here.

25
00:02:17,250 --> 00:02:24,870
OK, so let's build we're going to build and add this to our live expressions to see if we indeed get

26
00:02:24,870 --> 00:02:25,570
a priority.

27
00:02:26,970 --> 00:02:28,550
So what is Green's priority?

28
00:02:28,560 --> 00:02:29,460
Let's verify the.

29
00:02:30,440 --> 00:02:32,180
When we created the tasks.

30
00:02:33,270 --> 00:02:40,110
Green had a priority of one red headed priority of one, blue had a priority of two, but after we start,

31
00:02:40,290 --> 00:02:43,950
red drops its own priority back to one.

32
00:02:43,950 --> 00:02:46,290
So all of them end up with a priority of one.

33
00:02:47,200 --> 00:02:48,460
So I'm going to click here to view it.

34
00:02:55,320 --> 00:02:56,700
There is this unused for.

35
00:02:57,060 --> 00:02:57,980
I'm going to delete it.

36
00:02:58,590 --> 00:02:59,730
Click over here to build.

37
00:03:02,060 --> 00:03:07,160
To build successfully quick debug here the lower number seven.

38
00:03:11,240 --> 00:03:12,230
OK, over here.

39
00:03:19,640 --> 00:03:21,190
And then I'll switch over here.

40
00:03:25,700 --> 00:03:30,650
And then I'll come here to grant priority controversy, to copy live expressions.

41
00:03:32,250 --> 00:03:39,270
Basically over here, it's enter and then I'll run and I can see Green Priority's one.

42
00:03:40,180 --> 00:03:46,810
OK, so this is a very short list, and this is how to get to the top priority in the next couple of

43
00:03:46,810 --> 00:03:54,310
lessons, we will take a look at how to suspend a task, how to to resume the task and how a task can

44
00:03:54,310 --> 00:03:59,030
suspend itself, just like we saw how a task can change its own priority.

45
00:03:59,440 --> 00:04:01,020
So that's all there is for this lesson.

46
00:04:01,030 --> 00:04:01,920
I'll see you later.

47
00:04:01,940 --> 00:04:02,320
Have a nice.
