mirror of
https://github.com/apache/nuttx.git
synced 2026-06-03 22:20:31 +08:00
Add basic configuration options for SCHED_SPORADIC
This commit is contained in:
+10
-2
@@ -481,18 +481,26 @@ struct tcb_s
|
|||||||
uint8_t npend_reprio; /* Number of nested reprioritizations */
|
uint8_t npend_reprio; /* Number of nested reprioritizations */
|
||||||
uint8_t pend_reprios[CONFIG_SEM_NNESTPRIO];
|
uint8_t pend_reprios[CONFIG_SEM_NNESTPRIO];
|
||||||
#endif
|
#endif
|
||||||
#if defined(CONFIG_PRIORITY_INHERITANCE)
|
#if defined(CONFIG_PRIORITY_INHERITANCE) || defined(CONFIG_SCHED_SPORADIC)
|
||||||
uint8_t base_priority; /* "Normal" priority of the thread */
|
uint8_t base_priority; /* "Normal" priority of the thread */
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef CONFIG_SCHED_SPORADIC
|
||||||
|
int32_t low_priority; /* Sporadic low priority */
|
||||||
|
#endif
|
||||||
|
|
||||||
uint8_t task_state; /* Current state of the thread */
|
uint8_t task_state; /* Current state of the thread */
|
||||||
uint16_t flags; /* Misc. general status flags */
|
uint16_t flags; /* Misc. general status flags */
|
||||||
int16_t lockcount; /* 0=preemptable (not-locked) */
|
int16_t lockcount; /* 0=preemptable (not-locked) */
|
||||||
|
|
||||||
#if CONFIG_RR_INTERVAL > 0
|
#if CONFIG_RR_INTERVAL > 0 || defined(CONFIG_SCHED_SPORADIC)
|
||||||
int32_t timeslice; /* RR timeslice OR Sporadic */
|
int32_t timeslice; /* RR timeslice OR Sporadic */
|
||||||
/* replenishment interval remaining */
|
/* replenishment interval remaining */
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef CONFIG_SCHED_SPORADIC
|
||||||
|
uint32_t spstart; /* Start time of execution budget */
|
||||||
|
uint32_t replen; /* Sporadic replenishment interval */
|
||||||
|
uint32_t budget; /* Sporadic execution budget */
|
||||||
|
#endif
|
||||||
|
|
||||||
FAR struct wdog_s *waitdog; /* All timed waits used this wdog */
|
FAR struct wdog_s *waitdog; /* All timed waits used this wdog */
|
||||||
|
|
||||||
|
|||||||
+8
-1
@@ -304,7 +304,14 @@ config RR_INTERVAL
|
|||||||
default 0
|
default 0
|
||||||
---help---
|
---help---
|
||||||
The round robin timeslice will be set this number of milliseconds;
|
The round robin timeslice will be set this number of milliseconds;
|
||||||
Round robin scheduling can be disabled by setting this value to zero.
|
Round roben scheduling (SCHED_RR) is enabled by setting this
|
||||||
|
interval to a positive, non-zero value.
|
||||||
|
|
||||||
|
config SCHED_SPORADIC
|
||||||
|
bool "Support sporadic scheduling"
|
||||||
|
default n
|
||||||
|
---help---
|
||||||
|
Build in additional logic to support sporadic scheduling (SCHED_SPORADIC).
|
||||||
|
|
||||||
config TASK_NAME_SIZE
|
config TASK_NAME_SIZE
|
||||||
int "Maximum task name size"
|
int "Maximum task name size"
|
||||||
|
|||||||
Reference in New Issue
Block a user