mirror of
https://github.com/JakeHillion/scx.git
synced 2024-11-29 20:50:22 +00:00
scx_layered: Make config json assume default vaules for unspecified fields
This makes writing configs and allows introducing new fields without breaking existing configs.
This commit is contained in:
parent
60b346c1fc
commit
76fb0fdd8f
@ -302,20 +302,29 @@ enum LayerMatch {
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
enum LayerKind {
|
||||
Confined {
|
||||
cpus_range: Option<(usize, usize)>,
|
||||
util_range: (f64, f64),
|
||||
#[serde(default)]
|
||||
cpus_range: Option<(usize, usize)>,
|
||||
#[serde(default)]
|
||||
min_exec_us: u64,
|
||||
},
|
||||
Grouped {
|
||||
cpus_range: Option<(usize, usize)>,
|
||||
util_range: (f64, f64),
|
||||
#[serde(default)]
|
||||
cpus_range: Option<(usize, usize)>,
|
||||
#[serde(default)]
|
||||
min_exec_us: u64,
|
||||
#[serde(default)]
|
||||
preempt: bool,
|
||||
#[serde(default)]
|
||||
exclusive: bool,
|
||||
},
|
||||
Open {
|
||||
#[serde(default)]
|
||||
min_exec_us: u64,
|
||||
#[serde(default)]
|
||||
preempt: bool,
|
||||
#[serde(default)]
|
||||
exclusive: bool,
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user