Lines Matching refs:vc

165     pub fn alloc(&self, vc: Arc<VirtConsole>) -> Option<usize> {  in alloc()
168 vc.index.init(index); in alloc()
169 if let Some(vc_data) = vc.vc_data.as_ref() { in alloc()
173 inner.consoles.insert(index, vc); in alloc()
180 if let Some(vc) = inner.consoles.remove(&index) { in free()
181 vc.devfs_remove(); in free()
188 self.current_vc.read().as_ref().map(|(vc, _)| vc.clone()) in current_vc()
197 .and_then(|vc| vc.port().port_data().internal_tty()) in current_vc_tty_name()
202 pub fn set_current_vc(&self, vc: Arc<VirtConsole>) { in set_current_vc()
203 let index = *vc.index.get(); in set_current_vc()
204 *self.current_vc.write() = Some((vc, index)); in set_current_vc()
214 for (_index, vc) in inner.consoles.iter() { in lookup_vc_by_tty_name()
215 let found = vc in lookup_vc_by_tty_name()
223 return Some(vc.clone()); in lookup_vc_by_tty_name()
233 if let Some(vc) = self.lookup_vc_by_tty_name(name) { in setup_default_vc()
235 self.set_current_vc(vc); in setup_default_vc()
303 fn do_install(&self, tty: Arc<TtyCore>, vc: &Arc<VirtConsole>) -> Result<(), SystemError> { in do_install()
306 let binding = vc.vc_data().unwrap(); in do_install()
309 self.console.con_init(vc, &mut vc_data, true)?; in do_install()
344 vc.port().setup_internal_tty(Arc::downgrade(&tty)); in do_install()
345 tty.set_port(vc.port()); in do_install()
346 vc.devfs_setup()?; in do_install()
355 let vc = VirtConsole::new(Some(Arc::new(SpinLock::new(VirtualConsoleData::new( in install() localVariable
358 vc_manager().alloc(vc.clone()).ok_or(SystemError::EBUSY)?; in install()
359 self.do_install(tty, &vc) in install()
360 .inspect_err(|_| vc_manager().free(vc.index().unwrap()))?; in install()