state: store compositor pid
This commit is contained in:
parent
13483de017
commit
d8d73ba8e1
2 changed files with 6 additions and 2 deletions
|
|
@ -199,7 +199,8 @@ fn start_compositor2(
|
||||||
test_future: Option<TestFuture>,
|
test_future: Option<TestFuture>,
|
||||||
caps_thread: Option<PrCapsThread>,
|
caps_thread: Option<PrCapsThread>,
|
||||||
) -> Result<(), CompositorError> {
|
) -> Result<(), CompositorError> {
|
||||||
log::info!("pid = {}", uapi::getpid());
|
let pid = uapi::getpid();
|
||||||
|
log::info!("pid = {pid}");
|
||||||
log::info!("version = {VERSION}");
|
log::info!("version = {VERSION}");
|
||||||
if did_elevate_scheduler() {
|
if did_elevate_scheduler() {
|
||||||
log::info!("Running with elevated scheduler: SCHED_RR");
|
log::info!("Running with elevated scheduler: SCHED_RR");
|
||||||
|
|
@ -224,6 +225,7 @@ fn start_compositor2(
|
||||||
let crit_ids = Rc::new(CritMatcherIds::default());
|
let crit_ids = Rc::new(CritMatcherIds::default());
|
||||||
let eventfd_cache = EventfdCache::new(&ring, &engine);
|
let eventfd_cache = EventfdCache::new(&ring, &engine);
|
||||||
let state = Rc::new(State {
|
let state = Rc::new(State {
|
||||||
|
pid,
|
||||||
kb_ctx,
|
kb_ctx,
|
||||||
backend: CloneCell::new(Rc::new(DummyBackend)),
|
backend: CloneCell::new(Rc::new(DummyBackend)),
|
||||||
forker: Default::default(),
|
forker: Default::default(),
|
||||||
|
|
|
||||||
|
|
@ -145,10 +145,12 @@ use {
|
||||||
time::Duration,
|
time::Duration,
|
||||||
},
|
},
|
||||||
thiserror::Error,
|
thiserror::Error,
|
||||||
uapi::OwnedFd,
|
uapi::{OwnedFd, c},
|
||||||
};
|
};
|
||||||
|
|
||||||
pub struct State {
|
pub struct State {
|
||||||
|
#[expect(dead_code)]
|
||||||
|
pub pid: c::pid_t,
|
||||||
pub kb_ctx: KbvmContext,
|
pub kb_ctx: KbvmContext,
|
||||||
pub backend: CloneCell<Rc<dyn Backend>>,
|
pub backend: CloneCell<Rc<dyn Backend>>,
|
||||||
pub forker: CloneCell<Option<Rc<ForkerProxy>>>,
|
pub forker: CloneCell<Option<Rc<ForkerProxy>>>,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue