Hello, welcome back.
And the previous lesson, we saw how to change the priority of a task during runtime and this lesson,
we're going to see how to get the priority of the task.
There will be instances where you would want to read the priority of a particular task and decide whether
to decrease it or increase it.
So I'm going to make a copy of this last project, number six over here and paste it over here.
And I'll call this number seven.
By 7:00 or call, it gets in TASC.
Priority.
It's open in, so I'm going to expand this up into the call fuda source, meaning that see?
OK, so we know priority's just a number is a number, so I'm going to declare that you intended to
underscore T variable here.
I call this green priority.
We're going to grab the priority of green storage and this variable.
Like this, right?
So we're going to go to one of our functions and then simply call the task priority, get to function,
so we saw the task priority set.
Now we're going to take a look at the task priority get.
So I'm going to come into red over here and I'll try to get the priority of green.
So come over here and see green underscore priority equals.
Tosk.
For Hillary to get.
And I'm going to pass over here.
I'm going to get past the handful of green, so I see green Honda here.
OK, so let's build we're going to build and add this to our live expressions to see if we indeed get
a priority.
So what is Green's priority?
Let's verify the.
When we created the tasks.
Green had a priority of one red headed priority of one, blue had a priority of two, but after we start,
red drops its own priority back to one.
So all of them end up with a priority of one.
So I'm going to click here to view it.
There is this unused for.
I'm going to delete it.
Click over here to build.
To build successfully quick debug here the lower number seven.
OK, over here.
And then I'll switch over here.
And then I'll come here to grant priority controversy, to copy live expressions.
Basically over here, it's enter and then I'll run and I can see Green Priority's one.
OK, so this is a very short list, and this is how to get to the top priority in the next couple of
lessons, we will take a look at how to suspend a task, how to to resume the task and how a task can
suspend itself, just like we saw how a task can change its own priority.
So that's all there is for this lesson.
I'll see you later.
Have a nice.