Home
last modified time | relevance | path

Searched refs:NULL (Results 1 – 25 of 74) sorted by relevance

123

/DragonOS-0.1.3/kernel/src/mm/
Dslab.c6 {32, 0, 0, NULL, NULL, NULL, NULL},
7 {64, 0, 0, NULL, NULL, NULL, NULL},
8 {128, 0, 0, NULL, NULL, NULL, NULL},
9 {256, 0, 0, NULL, NULL, NULL, NULL},
10 {512, 0, 0, NULL, NULL, NULL, NULL},
11 {1024, 0, 0, NULL, NULL, NULL, NULL}, // 1KB
12 {2048, 0, 0, NULL, NULL, NULL, NULL},
13 {4096, 0, 0, NULL, NULL, NULL, NULL}, // 4KB
14 {8192, 0, 0, NULL, NULL, NULL, NULL},
15 {16384, 0, 0, NULL, NULL, NULL, NULL},
[all …]
Dvma.c26 if (vma->vm_mm == NULL) in vm_area_del()
38 if (vma->vm_prev == NULL && vma->vm_next == NULL) // 如果当前是剩余的最后一个vma in vm_area_free()
39 vma->vm_mm->vmas = NULL; in vm_area_free()
52 struct vm_area_struct *next = NULL; in __vma_link_list()
67 if (next != NULL) in __vma_link_list()
101 struct vm_area_struct *result = NULL; in vma_find()
102 while (vma != NULL) in vma_find()
154 if (prev == NULL) // 要将当前vma插入到链表的尾部 in vma_insert()
185 if (unlikely(anon_vma == NULL)) in __anon_vma_create_alloc()
186 return NULL; in __anon_vma_create_alloc()
[all …]
Dmmio.c40 if (buddy_region == NULL) // 没有空闲的mmio空间了 in mmio_create()
57 … retval = mm_create_vma(&initial_mm, buddy_region->vaddr + i, PAGE_2M_SIZE, vm_flags, NULL, NULL); in mmio_create()
64 … retval = mm_create_vma(&initial_mm, buddy_region->vaddr + i, PAGE_4K_SIZE, vm_flags, NULL, NULL); in mmio_create()
92 if (unlikely(vma == NULL)) in mmio_release()
/DragonOS-0.1.3/kernel/src/libs/
Dbitree.c22 if (node == NULL || cmp == NULL) in bt_create_tree()
30 root->size = (node == NULL) ? 0 : 1; in bt_create_tree()
46 FAIL_ON_TO(node == NULL, nomem); in bt_create_node()
67 if (root == NULL) in bt_insert()
71 struct bt_node_t *last_node = NULL; in bt_insert()
72 struct bt_node_t *insert_node = bt_create_node(NULL, NULL, NULL, value); in bt_insert()
75 while (this_node != NULL) in bt_insert()
85 if (unlikely(last_node == NULL)) in bt_insert()
115 if (ret_addr == NULL) in bt_query()
118 while (this_node != NULL && !equal(root, this_node, &tmp_node)) in bt_query()
[all …]
Didr.c61 return NULL; in __get_from_free_list()
71 if (item == NULL) in __get_from_free_list()
79 item->ary[0] = NULL; // 记得清空原来的数据 in __get_from_free_list()
102 if (unlikely(new_one == NULL)) in idr_preload()
130 if (NULL == new_node) in __idr_grow()
140 if (new_node != NULL) // 设置第0位 = 1, 同时维护树的大小 in __idr_grow()
144 if (new_node != NULL && new_node->full == IDR_FULL) in __idr_grow()
162 while (NULL == idp->top || idp->top->full == IDR_FULL) in __idr_get_empty_slot()
169 stk[layer + 1] = NULL; // 标志为数组末尾 in __idr_get_empty_slot()
186 if (layer > 0 && NULL == cur_layer) // 只有非叶子节点才需要开辟儿子节点 in __idr_get_empty_slot()
[all …]
Dmutex.c42 if (waiter == NULL) in mutex_lock()
77 struct mutex_waiter_t *wt = NULL; in mutex_unlock()
84 if (wt != NULL) in mutex_unlock()
90 if (wt != NULL) in mutex_unlock()
/DragonOS-0.1.3/user/libs/libc/src/
Dmalloc.c43 static malloc_mem_chunk_t *malloc_free_list = NULL;
44 static malloc_mem_chunk_t *malloc_free_list_end = NULL; // 空闲链表的末尾结点
72 if (malloc_free_list == NULL) in malloc_query_free_chunk_bf()
74 return NULL; in malloc_query_free_chunk_bf()
77 malloc_mem_chunk_t *best = NULL; in malloc_query_free_chunk_bf()
79 while (ptr != NULL) in malloc_query_free_chunk_bf()
90 if (best == NULL) in malloc_query_free_chunk_bf()
109 if (malloc_free_list == NULL) in malloc_query_free_chunk_ff()
110 return NULL; in malloc_query_free_chunk_ff()
122 return NULL; in malloc_query_free_chunk_ff()
[all …]
/DragonOS-0.1.3/kernel/src/ktest/
Dtest-idr.c29 assert(k_idr.top == NULL); // 刚被创建,必须是NULL in ktest_idr_case0()
31 assert(k_idr.free_list == NULL); in ktest_idr_case0()
55 assert(k_idr.free_list == NULL); in ktest_idr_case0()
56 assert(k_idr.top == NULL); in ktest_idr_case0()
84 assert(ptr != NULL); in ktest_idr_case1()
92 assert(id != NULL); in ktest_idr_case1()
94 assert(idr_find(&k_idr, a[i]) == NULL); in ktest_idr_case1()
101 assert(id != NULL); in ktest_idr_case1()
103 assert(idr_find(&k_idr, a[i]) == NULL); in ktest_idr_case1()
127 assert(id != NULL); in ktest_idr_case1()
[all …]
Dtest-bitree.c42 struct bt_node_t *rn = bt_create_node(NULL, NULL, NULL, tv1); in ktest_bitree_case1()
44 assert(rn != NULL); in ktest_bitree_case1()
49 assert(tree != NULL); in ktest_bitree_case1()
57 assert(tv2 != NULL); in ktest_bitree_case1()
66 assert(tv3 != NULL); in ktest_bitree_case1()
83 assert(node2 != NULL); in ktest_bitree_case1()
88 assert(tv4 != NULL); in ktest_bitree_case1()
102 assert(tv_not_exists != NULL); in ktest_bitree_case1()
106 assert(node_not_exists == NULL); in ktest_bitree_case1()
111 assert(tree->bt_node->right == NULL); in ktest_bitree_case1()
/DragonOS-0.1.3/kernel/src/libs/libUI/
Dscreen_manager.c33 if (buf == NULL) in __create_buffer()
48 if (p == NULL) in __create_buffer()
66 if (unlikely(buf == &video_frame_buffer_info || buf == NULL)) in __destroy_buffer()
68 if (unlikely(buf->vaddr == NULL)) in __destroy_buffer()
94 __current_framework = NULL; in scm_init()
106 if (name == NULL) in __check_ui_param()
110 if (ops == NULL) in __check_ui_param()
112 …if (ops->install == NULL || ops->uninstall == NULL || ops->enable == NULL || ops->disable == NULL in __check_ui_param()
113 ops->change == NULL) in __check_ui_param()
159 ui->ui_ops->enable(NULL); in scm_register_alloc()
[all …]
/DragonOS-0.1.3/kernel/src/driver/hid/
Dhidstrings.c1538 {0x0000, NULL, "Undefined"},
1547 {0x0009, NULL, "Button"},
1548 {0x000A, NULL, "Ordinal"},
1553 {0x0010, NULL, "Unicode"},
1557 {0x0081, NULL, "Monitor Pages"},
1575 {0xFFFF, NULL, ""},
/DragonOS-0.1.3/kernel/src/filesystem/rootfs/
Drootfs.c21 .put_superblock = NULL,
22 .write_inode = NULL,
23 .write_superblock = NULL,
28 return NULL; in rootfs_lookup()
31 .create = NULL,
32 .getAttr = NULL,
33 .lookup = NULL,
35 .mkdir = NULL,
36 .rename = NULL,
37 .rmdir = NULL,
[all …]
/DragonOS-0.1.3/kernel/src/ipc/
Dpipe.c34 struct pipe_t *pipe_ptr = NULL; in pipe_read()
67 struct pipe_t *pipe_ptr = NULL; in pipe_write()
103 .open = NULL,
107 .lseek = NULL,
108 .ioctl = NULL,
109 .readdir = NULL,
114 struct pipe_t *pipe_ptr = NULL; in pipe_alloc()
122 wait_queue_init(&pipe_ptr->data.read_wait_queue, NULL); in pipe_alloc()
123 wait_queue_init(&pipe_ptr->data.write_wait_queue, NULL); in pipe_alloc()
137 int *fd = NULL; in sys_pipe()
[all …]
/DragonOS-0.1.3/kernel/src/driver/video/
Dvideo.c21 static struct scm_buffer_info_t *video_refresh_target = NULL;
22 static struct process_control_block *video_daemon_pcb = NULL;
63 if (likely(video_refresh_target != NULL)) in video_refresh_daemon()
86 if (unlikely(video_daemon_pcb == NULL)) in video_refresh_framebuffer()
112 video_daemon_pcb = kthread_run(&video_refresh_daemon, NULL, "Video refresh daemon"); in video_reinitialize()
116 register_softirq(VIDEO_REFRESH_SIRQ, &video_refresh_framebuffer, NULL); in video_reinitialize()
144 register_softirq(VIDEO_REFRESH_SIRQ, &video_refresh_framebuffer, NULL); in video_set_refresh_target()
158 video_refresh_target = NULL; in video_init()
/DragonOS-0.1.3/user/libs/libc/src/include/
Dstddef.h6 #define NULL 0 macro
8 #define NULL ((void *)0) macro
/DragonOS-0.1.3/kernel/src/filesystem/vfs/
DVFS.c18 struct vfs_superblock_t *vfs_root_sb = NULL;
34 struct vfs_dir_entry_t *target_dentry = NULL; in vfs_mount_fs()
37 if (target_dentry == NULL) in vfs_mount_fs()
38 return NULL; in vfs_mount_fs()
40 struct vfs_filesystem_type_t *p = NULL; in vfs_mount_fs()
66 return NULL; in vfs_mount_fs()
77 struct vfs_filesystem_type_t *p = NULL; in vfs_register_filesystem()
97 fs->next = NULL; in vfs_unregister_filesystem()
116 return NULL; in vfs_search_dentry_list()
119 struct vfs_dir_entry_t *d_ptr = NULL; in vfs_search_dentry_list()
[all …]
Ddcache.c48 BUG_ON(dentry == NULL); in vfs_dentry_put()
57 if (in_value != NULL) in vfs_dentry_put()
82 if (dentry->dir_ops->release != NULL) in vfs_dentry_put()
101 if (dentry->dir_ops->release != NULL) in vfs_dentry_put()
107 if (fifo.buffer != NULL) in vfs_dentry_put()
/DragonOS-0.1.3/kernel/src/filesystem/devfs/
Ddevfs.c36 devfs_sb.blk_device = NULL; in devfs_read_superblock()
41 devfs_sb.private_sb_info = NULL; in devfs_read_superblock()
147 return NULL; in devfs_lookup()
164 dEntry->dir_inode->private_inode_info = NULL; in devfs_mkdir()
189 .next = NULL,
199 devfs_root_dentry->dir_inode->private_inode_info = NULL; in __devfs_init_root_inode()
234 struct vfs_dir_entry_t *dentry = NULL; // 该指针由对应类型设备的注册函数设置 in devfs_register_device()
248 if (ret_private_inode_info_ptr != NULL) in devfs_register_device()
270 struct vfs_dir_entry_t *base_dentry = NULL; in devfs_unregister_device()
271 struct vfs_dir_entry_t *target_dentry = NULL; in devfs_unregister_device()
[all …]
/DragonOS-0.1.3/user/apps/shell/
Dcmd.c18 char *shell_current_path = NULL;
42 char *file_path = NULL; in get_target_filepath()
248 if (dir == NULL) in shell_cmd_ls()
251 struct dirent *buf = NULL; in shell_cmd_ls()
257 if (buf == NULL) in shell_cmd_ls()
276 if (argv != NULL) in shell_cmd_ls()
293 if (argv != NULL) in shell_cmd_pwd()
330 if (argv != NULL) in shell_cmd_cat()
367 if (argv != NULL) in shell_cmd_touch()
384 char *full_path = NULL; in shell_cmd_mkdir()
[all …]
/DragonOS-0.1.3/kernel/src/process/
Dkthread.c10 struct process_control_block *kthreadd_pcb = NULL; // kthreadd守护线程的pcb
53 struct process_control_block *pcb = NULL; in __kthread_create_on_node()
56 if (create == NULL) in __kthread_create_on_node()
58 BUG_ON(name_fmt == NULL); in __kthread_create_on_node()
63 create->result = NULL; in __kthread_create_on_node()
72 while (kthreadd_pcb == NULL) // 若kthreadd未初始化,则等待kthreadd启动 in __kthread_create_on_node()
79 while (create->result == NULL) in __kthread_create_on_node()
299 if (kt == NULL) in kthread_set_worker_private()
316 kernel_thread(kthreadd, NULL, CLONE_FS | CLONE_SIGNAL); in kthread_mechanism_init()
333 pcb->worker_private = NULL; in free_kthread_struct()
Dprocess.c60 ….wait_child_proc_exit = 0, .worker_private = NULL, .policy = SCHED_NORMAL, .sig_blocked = 0, …
146 struct vfs_dir_entry_t *dentry = NULL; in process_open_exec_file()
147 struct vfs_file_t *filp = NULL; in process_open_exec_file()
151 if (dentry == NULL) in process_open_exec_file()
158 if (filp == NULL) in process_open_exec_file()
276 struct vm_area_struct *vma = NULL; in process_load_elf_file()
278 … mm_create_vma(current_pcb->mm, virt_base, PAGE_2M_SIZE, VM_USER | VM_ACCESS_FLAGS, NULL, &vma); in process_load_elf_file()
299 struct vm_area_struct *vma = NULL; in process_load_elf_file()
301 NULL, &vma); in process_load_elf_file()
335 struct vm_area_struct *vma = NULL; in process_load_elf_file()
[all …]
/DragonOS-0.1.3/kernel/src/time/
Dsleep.c41 if (rmtp != NULL) in nanosleep()
63 if (rmtp != NULL) in nanosleep()
85 return nanosleep(&ts, NULL); in usleep()
Dtimer.c25 timer_func_init(&timer_func_head, NULL, NULL, -1UL); in timer_init()
26 register_softirq(TIMER_SIRQ, &do_timer_softirq, NULL); in timer_init()
29 timer_func_init(tmp, &test_timer, NULL, 5); in timer_init()
143 BUG_ON(pcb == NULL); in __wake_up_helper()
/DragonOS-0.1.3/kernel/src/common/
Dlist.h78 if (old->prev != NULL) in list_replace()
81 if (old->next != NULL) in list_replace()
85 old->prev = NULL; in list_replace()
86 old->next = NULL; in list_replace()
110 if (entry->prev != NULL) in list_prev()
113 return NULL; in list_prev()
124 if (entry->next != NULL) in list_next()
127 return NULL; in list_next()
157 …_entry_or_null(ptr, type, member) (!list_empty(ptr) ? list_entry((ptr)->next, type, member) : NULL)
177 …_entry_or_full(ptr, type, member) (!list_empty(ptr) ? list_entry((ptr)->prev, type, member) : NULL)
/DragonOS-0.1.3/kernel/src/exception/
Dirq.c156 irq_desc_t *p = NULL; in irq_register()
167 if (p->irq_name == NULL) in irq_register()
199 p->controller = NULL; in irq_unregister()
202 p->irq_name = NULL; in irq_unregister()
203 p->parameter = NULL; in irq_unregister()
205 p->handler = NULL; in irq_unregister()

123