Home
last modified time | relevance | path

Searched refs:retval (Results 1 – 25 of 30) sorted by relevance

12

/DragonOS-0.1.3/kernel/src/libs/
Dlockref.c65 bool retval; in lockref_inc_not_zero()
67 retval = false; in lockref_inc_not_zero()
71 retval = true; in lockref_inc_not_zero()
74 return retval; in lockref_inc_not_zero()
96 int retval = -1; in lockref_dec() local
101 retval = lock_ref->count; in lockref_dec()
105 return retval; in lockref_dec()
147 bool retval = false; in lockref_dec_not_zero()
152 retval = true; in lockref_dec_not_zero()
155 return retval; in lockref_dec_not_zero()
[all …]
Dlockref.rs158 let mut retval = Err(-1); in inc_not_zero() localVariable
163 retval = Ok(self.count); in inc_not_zero()
167 return retval; in inc_not_zero()
186 let mut retval = Err(-1); in inc_not_dead() localVariable
191 retval = Ok(self.count); in inc_not_dead()
194 return retval; in inc_not_dead()
213 let retval: Result<i32, i32>; in dec() localVariable
218 retval = Ok(self.count); in dec()
220 retval = Err(-1); in dec()
225 return retval; in dec()
[all …]
/DragonOS-0.1.3/kernel/src/filesystem/vfs/
Ddcache.c15 int retval = 0; in vfs_dentry_put() local
24 retval = -EBUSY; in vfs_dentry_put()
34 retval = kfifo_alloc(&fifo, 1024 * sizeof(uint64_t), 0); in vfs_dentry_put()
36 if (retval != 0) in vfs_dentry_put()
72 retval = vfs_free_inode(dentry->dir_inode); in vfs_dentry_put()
73 if (retval > 0) // 还有其他的dentry引用着这个inode in vfs_dentry_put()
76 retval = 0; in vfs_dentry_put()
87 retval = 0; in vfs_dentry_put()
96 retval = vfs_free_inode(dentry->dir_inode); in vfs_dentry_put()
97 kdebug("retval=%d", retval); in vfs_dentry_put()
[all …]
DVFS.c249 int retval = 0; in vfs_mkdir() local
316 retval = parent_dir->dir_inode->inode_ops->mkdir(parent_dir->dir_inode, subdir_dentry, 0); in vfs_mkdir()
319 if (retval != 0) in vfs_mkdir()
323 return retval; in vfs_mkdir()
346 return retval; in vfs_mkdir()
451 …uint64_t retval = parent_dentry->dir_inode->inode_ops->create(parent_dentry->dir_inode, dentry, 0); in do_open() local
454 if (retval != 0) in do_open()
461 return retval; in do_open()
632 int retval = 0; in vfs_rmdir() local
674 retval = -ENOENT; in vfs_rmdir()
[all …]
/DragonOS-0.1.3/kernel/src/mm/
Dmmio.c21 int retval = 0; in mmio_create() local
57retval = mm_create_vma(&initial_mm, buddy_region->vaddr + i, PAGE_2M_SIZE, vm_flags, NULL, NULL); in mmio_create()
58 if (unlikely(retval != 0)) in mmio_create()
64retval = mm_create_vma(&initial_mm, buddy_region->vaddr + i, PAGE_4K_SIZE, vm_flags, NULL, NULL); in mmio_create()
65 if (unlikely(retval != 0)) in mmio_create()
72 return retval; in mmio_create()
84 int retval = 0; in mmio_release() local
104 retval = __mmio_buddy_give_back(vma->vm_start, 31 - __clz(vma->vm_end - vma->vm_start)); in mmio_release()
111 if (unlikely(retval != 0)) in mmio_release()
117 return retval; in mmio_release()
Dmmap.c322 int retval = 0; in mm_create_vma() local
335 retval = vma_insert(mm, vma); in mm_create_vma()
336 if (retval == -EEXIST || retval == __VMA_MERGED) // 之前已经存在了相同的vma,直接返回 in mm_create_vma()
340 if (retval == -EEXIST) in mm_create_vma()
362 int retval = 0; in mm_map_vma() local
412retval = mm_map_proc_page_table((uint64_t)vma->vm_mm->pgd, true, vma->vm_start + offset, paddr, le… in mm_map_vma()
413 if (unlikely(retval != 0)) in mm_map_vma()
431retval = mm_map_proc_page_table((uint64_t)vma->vm_mm->pgd, true, vma->vm_start + offset + mapped, … in mm_map_vma()
433 if (unlikely(retval != 0)) in mm_map_vma()
447retval = mm_map_proc_page_table((uint64_t)vma->vm_mm->pgd, true, vma->vm_start + offset + mapped, … in mm_map_vma()
[all …]
/DragonOS-0.1.3/kernel/src/process/
Dfork.c35 int retval = 0; in do_fork() local
44 retval = -ENOMEM; in do_fork()
45 return retval; in do_fork()
67 retval = kthread_set_worker_private(tsk); in do_fork()
68 if (IS_ERR_VALUE(retval)) in do_fork()
100 retval = -ENOMEM; in do_fork()
103 retval = process_copy_flags(clone_flags, tsk); in do_fork()
104 if (retval) in do_fork()
108 retval = process_copy_mm(clone_flags, tsk); in do_fork()
109 if (retval) in do_fork()
[all …]
Dprocess.rs41 let mut retval = false; in process_try_to_wake_up() localVariable
51 retval = true; in process_try_to_wake_up()
52 return retval; in process_try_to_wake_up()
63 retval = true; in process_try_to_wake_up()
67 return retval; in process_try_to_wake_up()
Dkthread.c160 int retval = 0; in kthread() local
182 retval = -EINTR; in kthread()
186 retval = thread_fn(data); in kthread()
188 kthread_exit(retval); in kthread()
271 int retval; in kthread_stop() local
279 retval = target->result; in kthread_stop()
284 return retval; in kthread_stop()
Dprocess.c179 int retval = 0; in process_load_elf_file() local
192 retval = filp->file_ops->read(filp, (char *)buf, sizeof(Elf64_Ehdr), &pos); in process_load_elf_file()
193 retval = 0; in process_load_elf_file()
197 retval = -ENOTSUP; in process_load_elf_file()
206 retval = -EUNSUPPORTED; in process_load_elf_file()
214 retval = -EUNSUPPORTED; in process_load_elf_file()
223 retval = -EUNSUPPORTED; in process_load_elf_file()
239 retval = -ENOEXEC; in process_load_elf_file()
351 return retval; in process_load_elf_file()
718 int retval = process_wakeup(pcb); in process_wakeup_immediately() local
[all …]
/DragonOS-0.1.3/user/apps/shell/
Dcmd.c394 int retval = mkdir(full_path, 0); in shell_cmd_mkdir() local
400 return retval; in shell_cmd_mkdir()
423 int retval = rmdir(full_path); in shell_cmd_rmdir() local
424 if (retval != 0) in shell_cmd_rmdir()
425 printf("Failed to remove %s, retval=%d\n", full_path, retval); in shell_cmd_rmdir()
431 return retval; in shell_cmd_rmdir()
445 int retval = 0; in shell_cmd_rm() local
456 retval = rm(full_path); in shell_cmd_rm()
458 if (retval != 0) in shell_cmd_rm()
459 printf("Failed to remove %s, retval=%d\n", full_path, retval); in shell_cmd_rm()
[all …]
/DragonOS-0.1.3/user/libs/libc/src/arch/x86_64/
Dcrt0.c14 int retval = main(argc, argv); in _start() local
15 exit(retval); in _start()
/DragonOS-0.1.3/kernel/src/arch/x86_64/asm/
Dcmpxchg.rs10 let retval = __try_cmpxchg_q(ptr, old_ptr, new_ptr); in try_cmpxchg_q() localVariable
11 return retval; in try_cmpxchg_q()
/DragonOS-0.1.3/kernel/src/filesystem/devfs/
Ddevfs.c226 int retval = 0; in devfs_register_device() local
239 retval = __devfs_chardev_register(private_info, &dentry); in devfs_register_device()
244 retval = -ENOTSUP; in devfs_register_device()
252 return retval; in devfs_register_device()
256 return retval; in devfs_register_device()
268 int retval = 0; in devfs_unregister_device() local
283 retval = -ENOTSUP; in devfs_unregister_device()
293 retval = -ENODEV; in devfs_unregister_device()
307 retval = vfs_dentry_put(target_dentry); in devfs_unregister_device()
308 if (retval < 0) in devfs_unregister_device()
[all …]
/DragonOS-0.1.3/user/libs/libc/src/
Dunistd.c103 void *retval = (void *)syscall_invoke(SYS_SBRK, (uint64_t)increment, 0, 0, 0, 0, 0, 0, 0); in sbrk() local
104 if (retval == (void *)-ENOMEM) in sbrk()
109 return (void *)retval; in sbrk()
146 int retval = syscall_invoke(SYS_EXECVE, (uint64_t)path, (uint64_t)argv, 0, 0, 0, 0, 0, 0); in execv() local
147 if (retval != 0) in execv()
Ddirent.c52 int retval = close(dirp->fd); in closedir() local
54 return retval; in closedir()
/DragonOS-0.1.3/kernel/src/common/
Dkfifo.h133 uint32_t retval = kfifo_in(fifo, from, size); in kfifo_in_locked() local
135 return retval; in kfifo_in_locked()
150 uint32_t retval = kfifo_out(fifo, to, size); in kfifo_out_locked() local
152 return retval; in kfifo_out_locked()
Dglib.h314 uint64_t retval; in __read8b() local
316 : "=r"(retval) in __read8b()
319 return retval; in __read8b()
331 uint32_t retval; in __read4b() local
333 : "=d"(retval) in __read4b()
336 return retval; in __read4b()
/DragonOS-0.1.3/kernel/src/driver/usb/xhci/
Dxhci.c264 int retval = 0; in xhci_hc_reset() local
272 retval = xhci_hc_stop(id); in xhci_hc_reset()
273 if (unlikely(retval)) in xhci_hc_reset()
274 return retval; in xhci_hc_reset()
293 return retval; in xhci_hc_reset()
643 int retval = pci_enable_msi(&msi_desc); in xhci_hc_irq_install() local
782 int retval = 0; in xhci_reset_port() local
814 retval = -ETIMEDOUT; in xhci_reset_port()
851 retval = 0; in xhci_reset_port()
858 retval = -1; in xhci_reset_port()
[all …]
/DragonOS-0.1.3/kernel/src/filesystem/procfs/
Dprocfs.c341 int64_t retval = 0; in procfs_create() local
344 retval = __check_name_available(dest_dEntry->name, dest_dEntry->name_length, 0); in procfs_create()
345 if (retval != 0) in procfs_create()
346 return retval; in procfs_create()
379 int64_t retval = 0; in procfs_mkdir() local
382 retval = __check_name_available(dEntry->name, dEntry->name_length, 0); in procfs_mkdir()
383 if (retval != 0) in procfs_mkdir()
384 return retval; in procfs_mkdir()
448 int retval = 0; in procfs_register_pid() local
457 retval = vfs_mkdir(tmp, 0, false); in procfs_register_pid()
[all …]
/DragonOS-0.1.3/kernel/src/syscall/
Dsyscall.c264 uint64_t retval = 0; in sys_lseek() local
276 retval = file_ptr->file_ops->lseek(file_ptr, offset, whence); in sys_lseek()
278 return retval; in sys_lseek()
339 uint64_t retval = current_pcb->mm->brk_end; in sys_sbrk() local
343 uint64_t new_brk = PAGE_2M_ALIGN(retval + regs->r8); in sys_sbrk()
353 return retval; in sys_sbrk()
359 return retval; in sys_sbrk()
468 uint64_t retval = 0; in sys_getdents() local
470 retval = filp->file_ops->readdir(filp, dirent, &vfs_fill_dirent); in sys_getdents()
472 return retval; in sys_getdents()
[all …]
/DragonOS-0.1.3/kernel/src/filesystem/fat32/
Dfat32.c609 int64_t retval = 0; in fat32_read() local
622 retval = -EIO; in fat32_read()
649 retval = count; in fat32_read()
651 return retval; in fat32_read()
700 int64_t retval = 0; in fat32_write() local
716 retval = -EIO; in fat32_write()
739 retval = -EIO; in fat32_write()
780 retval = count; in fat32_write()
782 return retval; in fat32_write()
855 int64_t retval = 0; in fat32_create() local
[all …]
Dfat_ent.c19 int retval = 0; in fat32_alloc_clusters() local
51 retval = -ENOSPC; in fat32_alloc_clusters()
55 if (retval == 0) // 成功 in fat32_alloc_clusters()
99 return retval; in fat32_alloc_clusters()
435 int retval = 0; in fat32_remove_entries() local
469 retval = fat32_write_FAT_entry(sb->blk_device, fsbi, data_cluster, 0); in fat32_remove_entries()
470 if (unlikely(retval != 0)) in fat32_remove_entries()
480 return retval; in fat32_remove_entries()
/DragonOS-0.1.3/kernel/src/debug/
Dkallsyms.c54 int retval = fscanf(filp, "%llx %c %510s\n", &entry->vaddr, &entry->type, str); in read_symbol() local
57 if (retval != 3) in read_symbol()
59 if (retval != EOF) in read_symbol()
/DragonOS-0.1.3/kernel/src/ipc/
Dsignal.rs90 let retval = signal_kill_something_info(sig, Some(&mut info), pid); in sys_kill() localVariable
92 if retval.is_ok() { in sys_kill()
93 x = retval.unwrap(); in sys_kill()
95 x = retval.unwrap_err(); in sys_kill()
126 let mut retval = Err(-(ESRCH as i32)); in signal_kill_proc_info() localVariable
135 return retval; in signal_kill_proc_info()
141 retval = signal_send_sig_info(sig, info, pcb.unwrap()); in signal_kill_proc_info()
144 return retval; in signal_kill_proc_info()
174 let mut retval = Err(-(ESRCH as i32)); in signal_send_sig_info() localVariable
180 retval = send_signal_locked(sig, info, target_pcb, PidType::PID); in signal_send_sig_info()
[all …]

12