Adjust task priorities to fit within supported platform priority ranges (#4337)

* Adjust task priorities to fit in supported platforms' priority ranges

Darwin's task priority range is most restrictive (15-47); adjusted priorities
to reside within that range.

* Add comment clarifying TASK_PRIORITY_DEFAULT and TASK_DEFAULT

* Adjust relative task priorities for uplink and downlink

This moves uplink tasks to higher priority than downlink tasks and places
consumer tasks at higher priority than producer tasks.
This commit is contained in:
Philip Romano 2025-10-22 15:46:05 -07:00 committed by GitHub
parent 3f25d8b535
commit bf12f48c27
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 34 additions and 24 deletions

View File

@ -34,8 +34,18 @@ class TaskHandle {};
class TaskInterface {
public:
//! Sentinel value to use a default value for the task argument to which this is supplied.
//!
//! Implementations of TaskInterface::start() should make a special case to use some default value that is
//! valid for the target platform.
static constexpr FwSizeType TASK_DEFAULT = std::numeric_limits<FwSizeType>::max();
//! Sentinel value to use a default priority for the task.
//!
//! Implementations of TaskInterface::start() should make a special case to use some default task priority
//! that is valid for the target platform.
static constexpr FwTaskPriorityType TASK_PRIORITY_DEFAULT = std::numeric_limits<FwTaskPriorityType>::max();
enum Status {
OP_OK, //!< message sent/received okay
INVALID_HANDLE, //!< Task handle invalid

View File

@ -32,7 +32,7 @@ U32 rateGroup2Context[Svc::ActiveRateGroup::CONNECTION_COUNT_MAX] = {};
U32 rateGroup3Context[Svc::ActiveRateGroup::CONNECTION_COUNT_MAX] = {};
enum TopologyConstants {
COMM_PRIORITY = 100,
COMM_PRIORITY = 34,
};
/**

View File

@ -29,39 +29,39 @@ module Ref {
instance blockDrv: Ref.BlockDriver base id 0x10000000 \
queue size Default.QUEUE_SIZE \
stack size Default.STACK_SIZE \
priority 140
priority 47
instance rateGroup1Comp: Svc.ActiveRateGroup base id 0x10001000 \
queue size Default.QUEUE_SIZE \
stack size Default.STACK_SIZE \
priority 120
priority 43
instance rateGroup2Comp: Svc.ActiveRateGroup base id 0x10002000 \
queue size Default.QUEUE_SIZE \
stack size Default.STACK_SIZE \
priority 119
priority 42
instance rateGroup3Comp: Svc.ActiveRateGroup base id 0x10003000 \
queue size Default.QUEUE_SIZE \
stack size Default.STACK_SIZE \
priority 118
priority 41
instance pingRcvr: Ref.PingReceiver base id 0x10004000 \
queue size Default.QUEUE_SIZE \
stack size Default.STACK_SIZE \
priority 100
priority 23
instance typeDemo: Ref.TypeDemo base id 0x10005000
instance cmdSeq: Svc.CmdSequencer base id 0x10006000 \
queue size Default.QUEUE_SIZE \
stack size Default.STACK_SIZE \
priority 97
priority 20
instance dpDemo: Ref.DpDemo base id 0x0A10 \
queue size Default.QUEUE_SIZE \
stack size Default.STACK_SIZE \
priority 96
priority 19
# ----------------------------------------------------------------------
# Queued component instances

View File

@ -17,10 +17,10 @@ module CdhCoreConfig {
}
module Priorities {
constant cmdDisp = 102
constant $health = 101
constant events = 100
constant tlmSend = 99
constant cmdDisp = 35
constant $health = 24
constant events = 23
constant tlmSend = 22
}
}

View File

@ -13,8 +13,8 @@ module ComCcsdsConfig {
}
module Priorities {
constant comQueue = 101
constant aggregator = 100
constant aggregator = 30
constant comQueue = 29
}
# Queue configuration constants

View File

@ -11,7 +11,7 @@ module ComFprimeConfig {
}
module Priorities {
constant comQueue = 101
constant comQueue = 29
}
# Queue configuration constants

View File

@ -9,6 +9,6 @@ module ComLoggerTeeConfig {
}
module Priorities {
constant comLog = 95
constant comLog = 18
}
}

View File

@ -18,10 +18,10 @@ module DataProductsConfig {
}
module Priorities {
constant dpCat = 101
constant dpMgr = 100
constant dpWriter = 99
constant dpBufferManager = 98
constant dpCat = 24
constant dpMgr = 23
constant dpWriter = 22
constant dpBufferManager = 21
}
# Buffer management constants

View File

@ -17,10 +17,10 @@ module FileHandlingConfig {
}
module Priorities {
constant fileUplink = 101
constant fileDownlink = 100
constant fileManager = 99
constant prmDb = 98
constant fileUplink = 24
constant fileDownlink = 23
constant fileManager = 22
constant prmDb = 21
}
# File downlink configuration constants