Home
last modified time | relevance | path

Searched refs:private_data (Results 1 – 13 of 13) sorted by relevance

/DragonOS/kernel/src/filesystem/kernfs/
H A Dcallback.rs38 private_data: SpinLockGuard<'a, Option<KernInodePrivateData>>, field
45 private_data: SpinLockGuard<'a, Option<KernInodePrivateData>>, in new()
49 private_data, in new()
59 pub fn private_data(&self) -> &Option<KernInodePrivateData> { in private_data() method
60 return &self.private_data; in private_data()
65 return &mut self.private_data; in private_data_mut()
69 let private_data = self.private_data(); in callback_read() localVariable
70 if let Some(private_data) = private_data { in callback_read()
71 return private_data.callback_read(buf, offset); in callback_read()
77 let private_data = self.private_data(); in callback_write() localVariable
[all …]
H A Dmod.rs113 private_data: SpinLock::new(None), in create_root_inode()
131 private_data: SpinLock<Option<KernInodePrivateData>>, field
165 KernCallbackData::new(self.self_ref.upgrade().unwrap(), self.private_data.lock()); in open()
354 KernCallbackData::new(self.self_ref.upgrade().unwrap(), self.private_data.lock()); in read_at()
378 KernCallbackData::new(self.self_ref.upgrade().unwrap(), self.private_data.lock()); in write_at()
393 private_data: Option<KernInodePrivateData>, in new()
409 private_data: SpinLock::new(private_data), in new()
452 private_data: Option<KernInodePrivateData>, in add_dir()
459 return self.inner_create(name, KernInodeType::Dir, mode, 0, private_data, callback); in add_dir()
484 private_data: Option<KernInodePrivateData>, in add_file()
[all …]
/DragonOS/kernel/src/driver/open_firmware/
H A Ddevice_node.rs33 private_data: Option<Arc<dyn DeviceNodePrivateData>>, field
54 private_data: None, in new()
93 pub fn private_data(&self) -> Option<Arc<dyn DeviceNodePrivateData>> { in private_data() method
94 self.inner.lock().private_data.clone() in private_data()
98 self.inner.lock().private_data = Some(data); in set_private_data()
/DragonOS/kernel/src/filesystem/vfs/
H A Dfile.rs208 pub private_data: SpinLock<FilePrivateData>, field
233 private_data: SpinLock::new(FilePrivateData::default()), in new()
236 f.inode.open(f.private_data.lock(), &mode)?; in new()
314 .read_at(offset, len, buf, self.private_data.lock()) in do_read()
356 .write_at(offset, len, buf, self.private_data.lock()) in do_write()
508 private_data: SpinLock::new(self.private_data.lock().clone()), in try_clone()
514 .open(res.private_data.lock(), &res.mode()) in try_clone()
558 self.private_data.lock().update_mode(mode); in set_mode()
594 let r = self.inode.kernel_ioctl(epitem, &self.private_data.lock()); in add_epoll()
632 self.inode.poll(&self.private_data.lock()) in poll()
[all …]
H A Dmount.rs415 private_data: &FilePrivateData, in ioctl()
417 return self.inner_inode.ioctl(cmd, data, private_data); in ioctl()
514 fn poll(&self, private_data: &FilePrivateData) -> Result<usize, SystemError> { in poll()
515 self.inner_inode.poll(private_data) in poll()
H A Dsyscall.rs551 let r = file.inode().ioctl(cmd, data, &file.private_data.lock()); in ioctl()
/DragonOS/kernel/src/filesystem/sysfs/
H A Dgroup.rs77 let private_data = KernInodePrivateData::SysFS(SysFSKernPrivateData::Dir( in do_create_group() localVariable
84 Some(private_data), in do_create_group()
/DragonOS/kernel/src/ipc/
H A Dpipe.rs66 pub fn poll(&self, private_data: &FilePrivateData) -> Result<usize, SystemError> { in poll()
69 let mode = if let FilePrivateData::Pipefs(PipeFsPrivateData { mode }) = private_data { in poll()
444 fn poll(&self, private_data: &FilePrivateData) -> Result<usize, SystemError> { in poll()
445 return self.inner.lock().poll(private_data); in poll()
H A Dsyscall.rs67 read_file.private_data = SpinLock::new(FilePrivateData::Pipefs(PipeFsPrivateData::new( in pipe2()
75 write_file.private_data = SpinLock::new(FilePrivateData::Pipefs(PipeFsPrivateData::new( in pipe2()
/DragonOS/kernel/src/filesystem/procfs/
H A Dmod.rs464 let mut private_data = ProcfsFilePrivateData::new(); in open() localVariable
467 ProcFileType::ProcStatus => inode.open_status(&mut private_data)?, in open()
468 ProcFileType::ProcMeminfo => inode.open_meminfo(&mut private_data)?, in open()
473 *data = FilePrivateData::Procfs(private_data); in open()
511 let mut private_data = match &*data { in read_at() localVariable
521 return inode.proc_read(offset, len, buf, &mut private_data) in read_at()
524 return inode.proc_read(offset, len, buf, &mut private_data) in read_at()
/DragonOS/kernel/src/net/event_poll/
H A Dmod.rs260 ep_file.private_data = SpinLock::new(FilePrivateData::EPoll(EPollPrivateData { epoll })); in do_create_epoll()
331 if let FilePrivateData::EPoll(epoll_data) = &*ep_file.private_data.lock() { in do_epoll_ctl()
422 if let FilePrivateData::EPoll(epoll_data) = &*ep_file.private_data.lock() { in do_epoll_wait()
595 if let FilePrivateData::EPoll(_) = *file.private_data.lock() { in is_epoll_file()
/DragonOS/kernel/src/driver/tty/
H A Dtty_device.rs426 fn poll(&self, private_data: &FilePrivateData) -> Result<usize, SystemError> { in poll()
427 let (tty, _) = if let FilePrivateData::Tty(tty_priv) = private_data { in poll()
/DragonOS/kernel/src/exception/
H A Dirqchip.rs279 private_data: Option<Arc<dyn IrqChipGenericPrivateData>>, field