...
More...
Go to the source code of this file.
...
...
Definition in file rkhfwk_rdygrp.h.
◆ rkh_rdygrp_init()
Initializes the ready mechanism for active objects.
- Parameters
-
◆ rkh_rdygrp_isReady()
rbool_t rkh_rdygrp_isReady |
( |
RKHRdyGrp *const |
me | ) |
|
Evaluates to true if any active object is ready.
- Parameters
-
◆ rkh_rdygrp_setReady()
void rkh_rdygrp_setReady |
( |
RKHRdyGrp *const |
me, |
|
|
rui8_t |
prio |
|
) |
| |
Making an active object ready inserting it into the ready list.
The lower 3 bits of the SMA's priority are used to determine the bit position in rkhrg.tbl[], while the next three most significant bits are used to determine the index into rkhrg.tbl[].
- Parameters
-
[in] | me | |
[in] | prio | number of active object's priority. |
◆ rkh_rdygrp_setUnready()
void rkh_rdygrp_setUnready |
( |
RKHRdyGrp *const |
me, |
|
|
rui8_t |
prio |
|
) |
| |
Removing an active object from the ready list.
Clears the ready bit of the active object in rkhrg.tbl[] and clears the bit in rkhrg.grp only if all active objects in a group are not ready to run, i.e. all bits in rkhrg.tbl[prio >> 3] are 0.
- Parameters
-
[in] | me | |
[in] | prio | number of active object's priority. |
◆ rkh_rdygrp_findHighest()
rui8_t rkh_rdygrp_findHighest |
( |
RKHRdyGrp *const |
me | ) |
|
Finding the highest priority active object ready.
Another table lookup is performed, rather than scanning through the table starting with rkhrg.tbl[0] to find the highest priority task ready to run. Eight bits are used to represent when tasks are ready in a group. The least significant bit has the highest priority. Using this byte to index the table returns the bit position of the highest priority bit set, a number between 0 and 7.
- Parameters
-
◆ rkh_rdygrp_traverse()
rui8_t rkh_rdygrp_traverse |
( |
RKHRdyGrp *const |
me, |
|
|
void(*)(RdyCbArg *) |
rdyCb, |
|
|
RdyCbArg * |
rdyCbArg |
|
) |
| |
Traverse a ready list to find the ready active objects and thus invoking a callback function.
- Parameters
-
[in] | me | |
[in] | rdyCb | invoked callback function to every found ready active object. |
[in] | rdyCbArg | argument of callback function rdyCb |
- Returns
- The number of found ready active objects