/DragonOS-0.1.8/kernel/src/libs/ |
D | bitree.c | 22 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 …]
|
D | idr.c | 61 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 …]
|
D | mutex.c | 42 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()
|
D | wait_queue_head.c | 24 BUG_ON(wait->pcb == NULL); in wait_queue_sleep_with_node() 39 BUG_ON(wait->pcb == NULL); in wait_queue_sleep_with_node_unlock() 55 BUG_ON(wait->pcb == NULL); in wait_queue_sleep_with_node_interriptible()
|
D | kfifo.c | 19 if (fifo->buffer == NULL) in kfifo_alloc() 56 if (unlikely(from == NULL)) in kfifo_in() 88 if (unlikely(to == NULL)) // 判断目标地址是否为空 in kfifo_out() 122 if (unlikely(to == NULL)) // 判断目标地址是否为空 in kfifo_out_peek()
|
/DragonOS-0.1.8/user/libs/libc/src/ |
D | malloc.c | 43 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 …]
|
D | dirent.c | 22 return NULL; in opendir() 77 return NULL; in readdir()
|
/DragonOS-0.1.8/kernel/src/libs/libUI/ |
D | screen_manager.c | 33 if (buf == NULL) in __create_buffer() 48 if (buf_vaddr == 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.8/kernel/src/ktest/ |
D | test-idr.c | 29 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 …]
|
D | test-bitree.c | 42 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.8/kernel/src/driver/pci/ |
D | pci_irq.c | 31 irq_desc_t *p = NULL; in c_irq_install() 41 if(p->irq_name!=NULL) in c_irq_install() 67 irq_desc_t *p = NULL; in c_irq_uninstall() 76 if(p->irq_name!=NULL) in c_irq_uninstall() 79 p->irq_name = NULL; in c_irq_uninstall() 81 if(p->controller!=NULL) in c_irq_uninstall() 84 p->controller = NULL; in c_irq_uninstall() 87 p->handler = NULL; in c_irq_uninstall()
|
/DragonOS-0.1.8/kernel/src/driver/hid/ |
D | hidstrings.c | 1538 {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.8/user/apps/test_sqlite3/ |
D | main.c | 10 NotUsed = NULL; in callback() 24 char *errmsg = NULL; in exec() 25 int rc = sqlite3_exec(db, sql, NULL, NULL, &errmsg); in exec() 34 char *errmsg = NULL; in query() 35 int rc = sqlite3_exec(db, sql, callback, NULL, &errmsg); in query()
|
/DragonOS-0.1.8/kernel/src/driver/video/ |
D | video.c | 23 static struct scm_buffer_info_t *video_refresh_target = NULL; 24 static struct process_control_block *video_daemon_pcb = NULL; 59 if (likely(video_refresh_target != NULL)) in video_refresh_daemon() 62 if (video_frame_buffer_info.vaddr != NULL) in video_refresh_daemon() 84 if (unlikely(video_daemon_pcb == NULL)) in video_refresh_framebuffer() 111 video_daemon_pcb = kthread_run(&video_refresh_daemon, NULL, "Video refresh daemon"); in video_reinitialize() 156 video_refresh_target = NULL; in video_init()
|
/DragonOS-0.1.8/user/libs/libc/src/include/export/ |
D | stddef.h | 6 #define NULL 0 macro 8 #define NULL ((void *)0) macro
|
/DragonOS-0.1.8/kernel/src/syscall/ |
D | syscall.c | 88 struct process_control_block *proc = NULL; in c_sys_wait4() 89 struct process_control_block *child_proc = NULL; in c_sys_wait4() 97 if (child_proc == NULL) in c_sys_wait4() 111 if (likely(status != NULL)) in c_sys_wait4()
|
/DragonOS-0.1.8/user/apps/shell/ |
D | cmd.c | 18 char *shell_current_path = NULL; 53 char *file_path = NULL; in get_target_filepath() 259 if (dir == NULL) in shell_cmd_ls() 262 struct dirent *buf = NULL; in shell_cmd_ls() 268 if (buf == NULL) in shell_cmd_ls() 287 if (argv != NULL) in shell_cmd_ls() 304 if (argv != NULL) in shell_cmd_pwd() 352 if (argv != NULL) in shell_cmd_cat() 389 if (argv != NULL) in shell_cmd_touch() 406 char *full_path = NULL; in shell_cmd_mkdir() [all …]
|
/DragonOS-0.1.8/kernel/src/process/ |
D | kthread.c | 10 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() 80 while (create->result == NULL) in __kthread_create_on_node() 304 if (kt == NULL) in kthread_set_worker_private() 321 kernel_thread(kthreadd, NULL, CLONE_FS | CLONE_SIGNAL); in kthread_mechanism_init() 338 pcb->worker_private = NULL; in free_kthread_struct()
|
D | process.c | 60 ….wait_child_proc_exit = 0, .worker_private = NULL, .policy = SCHED_NORMAL, .sig_blocked = 0, … 61 ….signal = &INITIAL_SIGNALS, .sighand = &INITIAL_SIGHAND, .address_space = NULL … 224 "m"(current_pcb->thread->rsp), "m"(current_pcb->thread->rip), "c"(NULL), in initial_kernel_thread() 225 "d"(NULL) in initial_kernel_thread() 331 wait_queue_init(&initial_proc_union.pcb.wait_child_proc_exit, NULL); in process_init() 377 return NULL; in process_find_pcb_by_pid() 391 BUG_ON(pcb == NULL); in process_wakeup() 392 if (pcb == NULL) in process_wakeup()
|
/DragonOS-0.1.8/kernel/src/common/ |
D | list.h | 78 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.8/kernel/src/exception/ |
D | irq.c | 192 irq_desc_t *p = NULL; in irq_register() 203 if (p->irq_name == NULL) in irq_register() 235 p->controller = NULL; in irq_unregister() 238 p->irq_name = NULL; in irq_unregister() 239 p->parameter = NULL; in irq_unregister() 241 p->handler = NULL; in irq_unregister()
|
/DragonOS-0.1.8/user/apps/http_server/ |
D | main.c | 124 url = strtok(NULL, " "); in handle_request() 125 http_version = strtok(NULL, "\r\n"); in handle_request() 129 if (method == NULL || url == NULL || http_version == NULL) in handle_request()
|
/DragonOS-0.1.8/kernel/src/smp/ |
D | smp.c | 69 ipi_regiserIPI(KICK_CPU_IRQ_NUM, NULL, &__smp_kick_cpu_handler, NULL, NULL, "IPI kick cpu"); in smp_init() 70 …ipi_regiserIPI(FLUSH_TLB_IRQ_NUM, NULL, &__smp__flush_tlb_ipi_handler, NULL, NULL, "IPI flush tlb"… in smp_init() 177 current_pcb->address_space = NULL; in smp_ap_start()
|
/DragonOS-0.1.8/kernel/src/time/ |
D | clocksource.c | 7 kthread_run(rs_clocksource_watchdog_kthread, NULL, "clocksource_watchdog"); in run_watchdog_kthread()
|
/DragonOS-0.1.8/docs/kernel/core_api/ |
D | data_structures.md | 453    调用这个函数,需要您保证ptr是非空的,即: `ptr != NULL`, 否则将会影响 `idr_find/idr_find_next/idr_find_next_get… 479    如果该ID不存在, 该函数不会产生异常错误, 因为在检测到该ID不存在的时候, 函数将会自动退出,并返回NULL。 492   如果删除成功,就返回被删除id所对应的ptr;否则返回NULL。注意:如果这个id本来就和NULL绑定,那么也会返回NULL 550    如果分配,将返回该ID对应的数据指针; 否则返回NULL.(注意, 返回NULL不一定代表这ID不存在,有可能该ID就是与空指针绑定。) 571    如果分配,将返回该ID对应的数据指针; 否则返回NULL.(注意, 返回NULL不一定代表这ID不存在,有可能该ID就是与空指针绑定。) 593    如果分配,将返回该ID对应的数据指针; 否则返回NULL.(注意, 返回NULL不一定代表这ID不存在,有可能该ID就是与空指针绑定。)
|