Home
last modified time | relevance | path

Searched refs:i (Results 1 – 25 of 75) sorted by relevance

123

/DragonOS-0.1.8/kernel/src/ktest/
Dtest-idr.c40 for (uint64_t i = 1; i < 64; i++) in ktest_idr_case0() local
42 int id = __lowbit_id(i), chk_id = -1; in ktest_idr_case0()
44 if ((i >> j) & 1) in ktest_idr_case0()
73 for (int i = 0; i < 128; i++) in ktest_idr_case1() local
75 assert(idr_alloc(&k_idr, &a[i], &a[i]) == 0); in ktest_idr_case1()
76 assert(a[i] == i); in ktest_idr_case1()
80 for (int i = 0; i < 128; i++) in ktest_idr_case1() local
82 int *ptr = idr_find(&k_idr, a[i]); in ktest_idr_case1()
83 assert(ptr == &a[i]); in ktest_idr_case1()
85 assert(*ptr == a[i]); in ktest_idr_case1()
[all …]
Dtest-kfifo.c31 for (int i = 1; i <= 10; ++i) in ktest_kfifo_case0_1() local
33 uint64_t tmp = i; in ktest_kfifo_case0_1()
42 for (int i = 1; i <= 10; ++i) in ktest_kfifo_case0_1() local
46 assert(tmp == i); in ktest_kfifo_case0_1()
47 assert(fifo.size == (10 - i) * sizeof(uint64_t)); in ktest_kfifo_case0_1()
49 assert(fifo.out_offset == i * sizeof(uint64_t)); in ktest_kfifo_case0_1()
64 for (int i = 1; i <= 31; ++i) in ktest_kfifo_case0_1() local
66 uint64_t tmp = i; in ktest_kfifo_case0_1()
94 for (int i = 1; i <= 20; ++i) in ktest_kfifo_case0_1() local
110 for (int i = 1; i <= 9; ++i) in ktest_kfifo_case0_1() local
[all …]
Dtest-mutex.c86 for (int i = 0; i < sizeof(kt_mutex_func_table) / sizeof(ktest_case_table); ++i) in ktest_test_mutex() local
88 kTEST("Testing case %d", i); in ktest_test_mutex()
89 kt_mutex_func_table[i](i, 0); in ktest_test_mutex()
/DragonOS-0.1.8/kernel/src/debug/
Dkallsyms.c97 for (uint64_t i = 0; i < entry_count; ++i) in read_map() local
99 if (strcmp(symbol_table[i].symbol, "_text")==0) in read_map()
100 text_vaddr = symbol_table[i].vaddr; in read_map()
101 if (strcmp(symbol_table[i].symbol, "_etext")==0) in read_map()
102 etext_vaddr = symbol_table[i].vaddr; in read_map()
122 for (uint64_t i = 0; i < entry_count; ++i) in generate_result() local
125 if (!symbol_to_write(symbol_table[i].vaddr, text_vaddr, etext_vaddr)) in generate_result()
128 if (symbol_table[i].vaddr == last_vaddr) in generate_result()
132 printf("\t.quad\t%#llx\n", symbol_table[i].vaddr); in generate_result()
135 last_vaddr = symbol_table[i].vaddr; in generate_result()
[all …]
/DragonOS-0.1.8/user/libs/libc/src/
Dstdlib.c9 int abs(int i) in abs() argument
11 return i < 0 ? -i : i; in abs()
14 long labs(long i) in labs() argument
16 return i < 0 ? -i : i; in labs()
19 long long llabs(long long i) in llabs() argument
21 return i < 0 ? -i : i; in llabs()
/DragonOS-0.1.8/kernel/src/sched/
Dcompletion.c201 for (int i = 0; i < n; i++) // 对每一个completion都等一遍 in wait_for_multicompletion() local
203 if (!completion_done(&x[i])) // 如果没有done,直接wait in wait_for_multicompletion()
205 wait_for_completion(&x[i]); in wait_for_multicompletion()
207 else if (!try_wait_for_completion(&x[i])) // 上面测试过done>0,那么这里尝试去获取一个done,如果失败了,就继续wait in wait_for_multicompletion()
209 wait_for_completion(&x[i]); in wait_for_multicompletion()
287 for (int i = 0; i < N; i++) in __test_completion() local
289 completion_init(&one_to_one[i]); in __test_completion()
290 completion_init(&waiter_many_to_one[i]); in __test_completion()
291 completion_init(&worker_many_to_one[i]); in __test_completion()
294 for (int i = 0; i < N; i++) in __test_completion() local
[all …]
/DragonOS-0.1.8/user/apps/shell/
Dcmd_test.c12 int fd[2], i, n; in shell_pipe_test() local
30 for (i = 0; i < 3; i++) in shell_pipe_test()
56 for (i = 0; i < 3; i++) in shell_pipe_test()
59 if (i == 1) in shell_pipe_test()
64 if (i == 2) in shell_pipe_test()
Dcmd_help.c18 for (int i = 0; i < help_table_num; ++i) in shell_help() local
19 help_table[i].func(); in shell_help()
/DragonOS-0.1.8/kernel/src/smp/
Dsmp.c47 for (int i = 0; i < total_processor_num; ++i) in smp_init() local
50 proc_local_apic_structs[i] = (struct acpi_Processor_Local_APIC_Structure_t *)(tmp_vaddr[i]); in smp_init()
58 for (int i = 200; i < 210; ++i) in smp_init() local
59 set_intr_gate(i, 0, SMP_interrupt_table[i - 200]); in smp_init()
74 for (int i = 0; i < total_processor_num; ++i) // i从1开始,不初始化bsp in smp_init() local
79 kdebug("[core %d] acpi processor UID=%d, APIC ID=%d, flags=%#010lx", i, in smp_init()
80 … proc_local_apic_structs[i]->ACPI_Processor_UID, proc_local_apic_structs[i]->local_apic_id, in smp_init()
81 proc_local_apic_structs[i]->flags); in smp_init()
82 if (proc_local_apic_structs[i]->local_apic_id == 0) in smp_init()
87 … if (!((proc_local_apic_structs[i]->flags & 0x1) || (proc_local_apic_structs[i]->flags & 0x2))) in smp_init()
[all …]
/DragonOS-0.1.8/kernel/src/libs/libUI/
Dtextui-render.c43 for (int i = start; i < window->vlines_num && count > 0; ++i, --count) in textui_refresh_vlines() local
47 textui_refresh_vline(window, i); in textui_refresh_vlines()
93 for (int i = 0; i < count; ++i) in textui_refresh_characters() local
96 __textui_render_chromatic(actual_line_id, start + i, &vline->chars[start + i]); in textui_refresh_characters()
135 for (int i = 0; i < TEXTUI_CHAR_HEIGHT; ++i) in __textui_render_chromatic() local
138 addr = (uint32_t *)(fb + textui_framework.buf->width * (y + i) + x); in __textui_render_chromatic()
/DragonOS-0.1.8/kernel/src/libs/
Dglib.c19 for(uint64_t i=0;i<times;++i) in __experimental_beep() local
26 for(uint64_t i=0;i<times;++i) in __experimental_beep() local
/DragonOS-0.1.8/kernel/src/driver/disk/ahci/
Dahci.c22 for (int i = 0; i < *count_ahci_devices; i++) in ahci_cpp_init() local
24 gen_devs[i] = ((struct pci_device_structure_general_device_t *)(ahci_devs[i])); in ahci_cpp_init()
Dmod.rs75 for i in 0..(ahci_dev_counts as usize) { in ahci_rust_init()
81 let virt_addr = AHCI_MAPPING_BASE as usize + unsafe { (*gen_devs[i]).BAR5 as usize } in ahci_rust_init()
88 let pi = volatile_read!(hba_mem_list[i].pi); in ahci_rust_init()
97 let tp = hba_mem_list[i].ports[j].check_type(); in ahci_rust_init()
121 hba_mem_list[i].ports[j].init(clb as u64, fb as u64, &ctbas); in ahci_rust_init()
131 i as u8, in ahci_rust_init()
147 i, in ahci_rust_init()
173 for i in 0..disks_list.len() { in get_disks_by_name()
174 if disks_list[i].0.lock().name == name { in get_disks_by_name()
175 return Ok(disks_list[i].clone()); in get_disks_by_name()
[all …]
/DragonOS-0.1.8/kernel/src/driver/interrupt/8259A/
D8259A.c12 for(int i=32;i<=55;++i) in init_8259A() local
13 set_intr_gate(i, 0, interrupt_table[i-32]); in init_8259A()
/DragonOS-0.1.8/kernel/src/driver/mouse/
Dps2_mouse.c102 for (int i = 0; i < 1000; i++) in ps2_mouse_get_mouse_ID() local
131 for (int i = 0; i < 1000; i++) in ps2_mouse_set_sample_rate() local
138 for (int i = 0; i < 1000; i++) in ps2_mouse_set_sample_rate() local
231 for (int i = 0; i < 1000; i++) in ps2_mouse_init() local
243 for (int i = 0; i < 1000; i++) in ps2_mouse_init() local
252 for (int i = 0; i < 1000; i++) in ps2_mouse_init() local
/DragonOS-0.1.8/user/libs/libc/src/math/
Dpow.c7 for (int i = 0; i < y; ++i) in pow() local
Dround.c15 uint64_t i; in round() member
18 int e = u.i >> 52 & 0x7ff; in round()
23 if (u.i >> 63) in round()
38 if (u.i >> 63) in round()
Dfabs.c10 uint64_t i; in fabs() member
12 u.i &= -1ULL / 2; in fabs()
27 u.i.se &= 0x7fff; in fabsl()
/DragonOS-0.1.8/tools/
Dbatch_delete_loop.py6 for i in range(start, end+1):
7 print("Deleting: " + str(i))
8 os.system("sudo losetup -d /dev/loop" + str(i))
/DragonOS-0.1.8/user/port/
Dbuild.sh11 for i in ${path[@]}; do
12 echo "Building $i"
13 cd $i
/DragonOS-0.1.8/user/apps/test_sqlite3/
Dmain.c12 for (int i = 0; i < argc; ++i) { in callback() local
13 printf("%s = %s\n", azColName[i], (argv[i] ? argv[i] : "NULL")); in callback()
/DragonOS-0.1.8/user/libs/libc/src/include/export/
Dstdlib.h29 int abs(int i);
30 long labs(long i);
31 long long llabs(long long i);
/DragonOS-0.1.8/kernel/src/common/math/
Dround.c17 uint64_t i; in round() member
20 int e = u.i >> 52 & 0x7ff; in round()
25 if (u.i >> 63) in round()
40 if (u.i >> 63) in round()
Dfabs.c10 uint64_t i; in fabs() member
12 u.i &= -1ULL / 2; in fabs()
27 u.i.se &= 0x7fff; in fabsl()
/DragonOS-0.1.8/kernel/src/driver/video/
Dvideo.c186 for (int i = 0; i < sizeof(init_text1) - 1; ++i) in video_init() local
187 c_uart_send(COM1, init_text1[i]); in video_init()
192 for (int i = 0; i < sizeof(init_text2) - 1; ++i) in video_init() local
193 c_uart_send(COM1, init_text2[i]); in video_init()

123