Home
last modified time | relevance | path

Searched refs:result (Results 1 – 25 of 36) sorted by relevance

12

/DragonOS-0.1.8/kernel/src/time/
Dtimeconv.rs86 let mut result = CalendarTime::new(); in time_to_calendar() localVariable
103 result.tm_hour = (rem / SECS_PER_HOUR) as i32; in time_to_calendar()
107 result.tm_min = (rem / 60) as i32; in time_to_calendar()
111 result.tm_sec = rem as i32; in time_to_calendar()
115 result.tm_wday = ((4 + days) % 7) as i32; in time_to_calendar()
125 result.tm_year = (year - 1900) as i32; in time_to_calendar()
126 result.tm_yday = days as i32; in time_to_calendar()
139 result.tm_mon = (mon - 1) as i32; in time_to_calendar()
140 result.tm_mday = (days + 1) as i32; in time_to_calendar()
142 result in time_to_calendar()
Dtimer.rs73 let result: Arc<Timer> = Arc::new(Timer(SpinLock::new(InnerTimer { in new() localVariable
79 result.0.lock().self_ref = Arc::downgrade(&result); in new()
81 return result; in new()
Dclocksource.rs221 let mut result = 0; in log2() localVariable
226 result |= 16; in log2()
230 result |= 8; in log2()
234 result |= 4; in log2()
238 result |= 2; in log2()
241 result |= 1; in log2()
244 result in log2()
/DragonOS-0.1.8/kernel/src/driver/pci/
Dpci.rs115 let mut result = Vec::new(); in get_pci_device_structure_mut() localVariable
119 result.push(box_pci_device_structure); in get_pci_device_structure_mut()
122 result in get_pci_device_structure_mut()
134 let mut result = Vec::new(); in get_pci_device_structure() localVariable
138 result.push(box_pci_device_structure); in get_pci_device_structure()
141 result in get_pci_device_structure()
723 let result = PciArch::read_config(&bus_device_function, STATUS_COMMAND_OFFSET); in capabilities_offset() localVariable
724 let status: Status = Status::from_bits_truncate((result >> 16) as u16); in capabilities_offset()
742 let result = PciArch::read_config(&bus_device_function, 0x00); in pci_read_header() localVariable
743 let vendor_id = result as u16; in pci_read_header()
[all …]
/DragonOS-0.1.8/kernel/src/libs/
Dint_like.rs88 ) -> ::core::result::Result<$new_type_name, $new_type_name> {
93 Ok(result) => Ok($new_type_name::from(result)),
94 Err(result) => Err($new_type_name::from(result)),
104 ) -> ::core::result::Result<$new_type_name, $new_type_name> {
111 Ok(result) => Ok($new_type_name::from(result)),
112 Err(result) => Err($new_type_name::from(result)),
Dlz4.c1155 int result; in LZ4_compress_generic_validated() local
1616 result = (int)(((char *)op) - dest); in LZ4_compress_generic_validated()
1617 assert(result > 0); in LZ4_compress_generic_validated()
1618 DEBUGLOG(5, "LZ4_compress_generic: compressed %i bytes into %i bytes", inputSize, result); in LZ4_compress_generic_validated()
1619 return result; in LZ4_compress_generic_validated()
1768 int result; in LZ4_compress_fast() local
1777result = LZ4_compress_fast_extState(ctxPtr, source, dest, inputSize, maxOutputSize, acceleration); in LZ4_compress_fast()
1782 return result; in LZ4_compress_fast()
1828 int result = LZ4_compress_destSize_extState(ctx, src, dst, srcSizePtr, targetDstSize); in LZ4_compress_destSize() local
1833 return result; in LZ4_compress_destSize()
[all …]
Dvec_cursor.rs26 let mut result = VecCursor { in zerod() localVariable
30 result.data.resize(length, 0); in zerod()
31 return result; in zerod()
/DragonOS-0.1.8/kernel/src/process/
Dkthread.c33 struct process_control_block *result; member
63 create->result = NULL; in __kthread_create_on_node()
80 while (create->result == NULL) in __kthread_create_on_node()
83 pcb = create->result; in __kthread_create_on_node()
84 if (!IS_ERR(create->result)) in __kthread_create_on_node()
114 void kthread_exit(long result) in kthread_exit() argument
117 kt->result = result; in kthread_exit()
175 create->result = current_pcb; in kthread()
200 create->result = (struct process_control_block *)pid; in __create_kthread()
284 retval = target->result; in kthread_stop()
/DragonOS-0.1.8/docs/kernel/process_management/
Dkthread.md124 &emsp;&emsp;`void kthread_exit(long result)`
128 &emsp;&emsp;让当前内核线程退出,并返回result参数给kthread_stop()函数。
132 **result**
/DragonOS-0.1.8/kernel/src/driver/virtio/
Dvirtio.rs89 let result = get_pci_device_structure_mut(list, NETWORK_CLASS, ETHERNET_SUBCLASS); in get_virtio_net_device() localVariable
90 if result.is_empty() { in get_virtio_net_device()
93 for device in result { in get_virtio_net_device()
/DragonOS-0.1.8/kernel/src/common/
Dkthread.h16 int result; member
95 void kthread_exit(long result);
/DragonOS-0.1.8/kernel/src/filesystem/devfs/
Dnull_dev.rs54 let result = Arc::new(LockedNullInode(SpinLock::new(inode))); in new() localVariable
55 result.0.lock().self_ref = Arc::downgrade(&result); in new()
57 return result; in new()
Dzero_dev.rs54 let result = Arc::new(LockedZeroInode(SpinLock::new(inode))); in new() localVariable
55 result.0.lock().self_ref = Arc::downgrade(&result); in new()
57 return result; in new()
/DragonOS-0.1.8/kernel/src/driver/net/
Dvirtio_net.rs99 let result = Arc::new(VirtioInterface { in new() localVariable
106 return result; in new()
123 let result = VirtioNICDriver { inner }; in new() localVariable
124 return result; in new()
194 let result = f(tx_buf.packet_mut()); in consume() localVariable
196 return result; in consume()
207 let result = f(rx_buf.packet_mut()); in consume() localVariable
213 result in consume()
/DragonOS-0.1.8/kernel/src/sched/
Drt.rs110 let mut result = SchedulerRT { in new() localVariable
117 result.cpu_queue.push(Vec::new()); in new()
120 result.cpu_queue[cpu_id as usize].push(Box::leak(Box::new(RTQueue::new()))); in new()
125 result in new()
129 return result; in new()
Dcfs.rs116 let mut result = SchedulerCFS { in new() localVariable
122 result in new()
127 result.cpu_queue[0].idle_pcb = unsafe { &mut initial_proc_union.pcb }; in new()
129 return result; in new()
/DragonOS-0.1.8/kernel/src/filesystem/ramfs/
Dmod.rs102 let result: Arc<RamFS> = Arc::new(RamFS { root_inode: root }); in new() localVariable
105 let mut root_guard: SpinLockGuard<RamFSInode> = result.root_inode.0.lock(); in new()
106 root_guard.parent = Arc::downgrade(&result.root_inode); in new()
107 root_guard.self_ref = Arc::downgrade(&result.root_inode); in new()
108 root_guard.fs = Arc::downgrade(&result); in new()
112 return result; in new()
249 let result: Arc<LockedRamFSInode> = Arc::new(LockedRamFSInode(SpinLock::new(RamFSInode { in create_with_data() localVariable
274 result.0.lock().self_ref = Arc::downgrade(&result); in create_with_data()
277 inode.children.insert(String::from(name), result.clone()); in create_with_data()
279 return Ok(result); in create_with_data()
/DragonOS-0.1.8/kernel/src/driver/disk/ahci/
Dahci_inode.rs60 let result = Arc::new(LockedAhciInode(SpinLock::new(inode))); in new() localVariable
61 result.0.lock().self_ref = Arc::downgrade(&result); in new()
63 return result; in new()
Dahcidisk.rs371 let result: Arc<LockedAhciDisk> = Arc::new(LockedAhciDisk(SpinLock::new(AhciDisk { in new() localVariable
380 let table: MbrDiskPartionTable = result.read_mbr_table()?; in new()
381 let weak_this: Weak<LockedAhciDisk> = Arc::downgrade(&result); // 获取this的弱指针 in new()
396 result.0.lock().partitions = part_s; in new()
397 result.0.lock().self_ref = weak_this; in new()
398 return Ok(result); in new()
/DragonOS-0.1.8/kernel/src/driver/keyboard/
Dps2_keyboard.rs70 let result = Arc::new(LockedPS2KeyBoardInode( in new() localVariable
74 result.0.write().self_ref = Arc::downgrade(&result); in new()
76 return result; in new()
/DragonOS-0.1.8/kernel/src/filesystem/vfs/
Dmod.rs385 let (mut result, mut rest_path) = if let Some(rest) = path.strip_prefix('/') { in lookup_follow_symlink()
395 if result.metadata()?.file_type != FileType::Dir { in lookup_follow_symlink()
420 let inode = result.find(&name)?; in lookup_follow_symlink()
435 return result.lookup_follow_symlink(&new_path, max_follow_times - 1); in lookup_follow_symlink()
437 result = inode; in lookup_follow_symlink()
441 return Ok(result); in lookup_follow_symlink()
/DragonOS-0.1.8/kernel/src/filesystem/procfs/
Dmod.rs268 let result: Arc<ProcFS> = Arc::new(ProcFS { root_inode: root }); in new() localVariable
271 let mut root_guard: SpinLockGuard<ProcFSInode> = result.root_inode.0.lock(); in new()
272 root_guard.parent = Arc::downgrade(&result.root_inode); in new()
273 root_guard.self_ref = Arc::downgrade(&result.root_inode); in new()
274 root_guard.fs = Arc::downgrade(&result); in new()
278 return result; in new()
490 let result: Arc<LockedProcFSInode> = in create_with_data() localVariable
520 result.0.lock().self_ref = Arc::downgrade(&result); in create_with_data()
523 inode.children.insert(String::from(name), result.clone()); in create_with_data()
525 return Ok(result); in create_with_data()
/DragonOS-0.1.8/kernel/src/ipc/
Dpipe.rs65 let result = Arc::new(Self(SpinLock::new(inner))); in new() localVariable
66 let mut guard = result.0.lock(); in new()
67 guard.self_ref = Arc::downgrade(&result); in new()
70 return result; in new()
/DragonOS-0.1.8/kernel/src/filesystem/sysfs/
Dmod.rs303 let result: Arc<LockedSysFSInode> = Arc::new(LockedSysFSInode(SpinLock::new(SysFSInode { in do_create_with_data() localVariable
327 result.0.lock().self_ref = Arc::downgrade(&result); in do_create_with_data()
330 guard.children.insert(String::from(_name), result.clone()); in do_create_with_data()
331 return Ok(result); in do_create_with_data()
/DragonOS-0.1.8/kernel/src/net/
Dsocket.rs616 let result = wire::IpEndpoint::new( in endpoint() localVariable
622 return Some(Endpoint::Ip(Some(result))); in endpoint()
962 let mut result: Option<Endpoint> = in endpoint() localVariable
965 if result.is_none() { in endpoint()
969 result = Some(Endpoint::Ip(Some(ep))); in endpoint()
972 return result; in endpoint()
1178 let mut result = PollStatus::empty(); in poll() localVariable
1180 result.insert(PollStatus::READ); in poll()
1183 result.insert(PollStatus::WRITE); in poll()
1186 result.insert(PollStatus::ERROR); in poll()
[all …]

12