/DragonOS-0.1.2/kernel/src/common/ |
D | list.h | 185 #define list_next_entry(pos, member) list_entry((pos)->member.next, typeof(*(pos)), member) argument 193 #define list_prev_entry(pos, member) list_entry((pos)->member.prev, typeof(*(pos)), member) argument 242 #define list_for_each_entry(pos, head, member) \ argument 243 for (pos = list_first_entry(head, typeof(*pos), member); \ 244 &pos->member != (head); \ 245 pos = list_next_entry(pos, member)) 255 #define list_for_each_entry_safe(pos, n, head, member) \ argument 256 for (pos = list_first_entry(head, typeof(*pos), member), n = list_next_entry(pos, member); \ 257 &pos->member != (head); \ 258 pos = n, n = list_next_entry(n, member)) [all …]
|
D | hid.h | 130 int pos; // report_desc中,当前正在处理的位置 member
|
/DragonOS-0.1.2/kernel/src/libs/ |
D | stdlib.c | 13 char *pos = buffer + sizeof(buffer) - 1; in ltoa() local 17 *pos-- = '\0'; in ltoa() 20 *pos-- = '0' + n % 10; in ltoa() 22 if (pos < buffer) in ltoa() 23 return pos + 1; in ltoa() 27 *pos-- = '-'; in ltoa() 28 return pos + 1; in ltoa()
|
D | idr.c | 175 int pos = __lowbit_id(~cur_layer->full); in __idr_get_empty_slot() local 177 if (unlikely(pos < 0)) in __idr_get_empty_slot() 183 id = (id << IDR_BITS) | pos; in __idr_get_empty_slot() 184 cur_layer = cur_layer->ary[pos]; in __idr_get_empty_slot() 196 stk[layer]->ary[pos] = cur_layer; // 最后别忘了记录儿子节点 in __idr_get_empty_slot()
|
/DragonOS-0.1.2/docs/kernel/core_api/ |
D | kernel_api.md | 190 ### `list_next_entry(pos, member)` 198 **pos** 206 ### `list_prev_entry(pos, member)` 279 ### `list_for_each_entry(pos, head, member)` 287 **pos** 297   struct List在pos的结构体中的成员变量名 299 ### `list_for_each_entry_reverse(pos, head, member)` 309 ### `list_for_each_entry_safe(pos, n, head, member)` 317 **pos** 323   用于存储临时值的,和pos相同类型的指针 [all …]
|
/DragonOS-0.1.2/kernel/src/filesystem/procfs/ |
D | procfs.c | 199 long pos = *position; in simple_procfs_read() local 205 if (pos < 0) in simple_procfs_read() 207 if (pos >= available || !count) in simple_procfs_read() 209 if (count > available - pos) in simple_procfs_read() 210 count = available - pos; in simple_procfs_read() 212 ret = copy_to_user(to, from + pos, count); in simple_procfs_read() 214 *position = pos + ret; in simple_procfs_read() 234 long pos = 0; in procfs_lseek() local 238 pos = offset; in procfs_lseek() 241 pos = file_ptr->position + offset; in procfs_lseek() [all …]
|
/DragonOS-0.1.2/kernel/src/driver/hid/ |
D | hidparse.c | 121 while (!found && (parser->pos < parser->report_desc_size)) in hid_parse() 128 printk("\n %02X ", parser->report_desc[parser->pos]); in hid_parse() 130 parser->item = parser->report_desc[parser->pos++]; in hid_parse() 133 …memcpy(&parser->value, &parser->report_desc[parser->pos], item_size[parser->item & HID_SIZE_MASK]); in hid_parse() 140 printk("%02X ", parser->report_desc[parser->pos + i]); in hid_parse() 146 parser->pos += item_size[parser->item & HID_SIZE_MASK]; in hid_parse() 500 int pos = 0; in __get_report_offset() local 502 while ((pos < HID_MAX_REPORT) && (parser->offset_table[pos][0] != 0)) // 当offset的id不为0时 in __get_report_offset() 504 … if ((parser->offset_table[pos][0] == report_id) && (parser->offset_table[pos][1] == report_type)) in __get_report_offset() 505 return &parser->offset_table[pos][2]; in __get_report_offset() [all …]
|
/DragonOS-0.1.2/kernel/src/process/ |
D | process.c | 178 uint64_t pos = 0; in process_load_elf_file() local 179 pos = filp->file_ops->lseek(filp, 0, SEEK_SET); in process_load_elf_file() 180 retval = filp->file_ops->read(filp, (char *)buf, sizeof(Elf64_Ehdr), &pos); in process_load_elf_file() 220 pos = ehdr.e_phoff; in process_load_elf_file() 222 pos = filp->file_ops->lseek(filp, pos, SEEK_SET); in process_load_elf_file() 223 …filp->file_ops->read(filp, (char *)buf, (uint64_t)ehdr.e_phentsize * (uint64_t)ehdr.e_phnum, &pos); in process_load_elf_file() 244 pos = phdr->p_offset; in process_load_elf_file() 301 pos = filp->file_ops->lseek(filp, pos, SEEK_SET); in process_load_elf_file() 306 … val = filp->file_ops->read(filp, (char *)(virt_base + beginning_offset), to_trans, &pos); in process_load_elf_file()
|
/DragonOS-0.1.2/kernel/src/filesystem/fat32/ |
D | fat32.c | 797 long pos = 0; in fat32_lseek() local 801 pos = offset; in fat32_lseek() 804 pos = file_ptr->position + offset; in fat32_lseek() 807 pos = file_ptr->dEntry->dir_inode->file_size + offset; in fat32_lseek() 815 if (pos < 0 || pos > file_ptr->dEntry->dir_inode->file_size) in fat32_lseek() 817 file_ptr->position = pos; in fat32_lseek() 820 return pos; in fat32_lseek()
|
/DragonOS-0.1.2/kernel/src/driver/usb/xhci/ |
D | xhci.c | 1473 uint32_t pos = 0; in xhci_get_interface_desc() local 1474 while (pos < total_len) in xhci_get_interface_desc() 1476 struct usb_interface_desc *ptr = (struct usb_interface_desc *)(in_buf + pos); in xhci_get_interface_desc() 1479 pos += ptr->len; in xhci_get_interface_desc() 1490 pos += ptr->len; in xhci_get_interface_desc() 2037 uint32_t pos = 0; in xhci_get_hid_descriptor() local 2038 while (pos < total_len) in xhci_get_hid_descriptor() 2040 struct usb_hid_desc *ptr = (struct usb_hid_desc *)(full_conf + pos); in xhci_get_hid_descriptor() 2043 pos += ptr->len; in xhci_get_hid_descriptor()
|