Home
last modified time | relevance | path

Searched refs:pos (Results 1 – 12 of 12) sorted by relevance

/DragonOS-0.1.8/kernel/src/libs/
Dvec_cursor.rs15 pos: usize, field
21 return Self { data: data, pos: 0 }; in new()
28 pos: 0, in zerod()
46 if self.pos >= self.data.len() { in read_u8()
49 self.pos += 1; in read_u8()
50 return Ok(self.data[self.pos - 1]); in read_u8()
55 if self.pos + 2 > self.data.len() { in read_u16()
59 res |= (self.data[self.pos] as u16) & 0xff; in read_u16()
60 self.pos += 1; in read_u16()
61 res |= ((self.data[self.pos] as u16) & 0xff) << 8; in read_u16()
[all …]
Dstdlib.c13 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()
Didr.c175 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.8/kernel/src/common/
Dlist.h185 #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 …]
Dhid.h130 int pos; // report_desc中,当前正在处理的位置 member
/DragonOS-0.1.8/docs/kernel/core_api/
Dkernel_api.md190 ### `list_next_entry(pos, member)`
198 **pos**
206 ### `list_prev_entry(pos, member)`
279 ### `list_for_each_entry(pos, head, member)`
287 **pos**
297 &emsp;&emsp;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 &emsp;&emsp;用于存储临时值的,和pos相同类型的指针
[all …]
/DragonOS-0.1.8/kernel/src/driver/hid/
Dhidparse.c121 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.8/kernel/src/filesystem/vfs/
Dfile.rs196 let pos: i64; in lseek() localVariable
199 pos = offset; in lseek()
202 pos = self.offset as i64 + offset; in lseek()
206 pos = metadata.size + offset; in lseek()
214 if pos < 0 { in lseek()
217 self.offset = pos as usize; in lseek()
Dmod.rs403 Some(pos) => { in lookup_follow_symlink()
405 name = String::from(&rest_path[0..pos]); in lookup_follow_symlink()
407 rest_path = String::from(&rest_path[pos + 1..]); in lookup_follow_symlink()
/DragonOS-0.1.8/kernel/src/time/
Dclocksource.rs291 for (pos, ele) in list_guard.iter().enumerate() { in clocksource_enqueue()
293 spilt_pos = pos; in clocksource_enqueue()
411 for (pos, ele) in list.iter().enumerate() { in clocksource_dequeue_watchdog()
415 del_pos = pos; in clocksource_dequeue_watchdog()
444 for (pos, ele) in clocksource_list.iter().enumerate() { in clocksource_dequeue_watchdog()
461 replace_pos = pos; in clocksource_dequeue_watchdog()
498 for (pos, ele) in list.iter().enumerate() { in clocksource_dequeue()
502 del_pos = pos; in clocksource_dequeue()
754 for (pos, ele) in wd_list.iter().enumerate() { in clocksource_watchdog_kthread()
757 del_vec.push(pos); in clocksource_watchdog_kthread()
[all …]
Dtimer.rs102 for (pos, elt) in timer_list.iter().enumerate() { in activate()
104 split_pos = pos; in activate()
/DragonOS-0.1.8/kernel/src/filesystem/fat/
Dentry.rs2155 let pos: usize = ((index - 1) as usize) * LongDirEntry::LONG_NAME_STR_LEN; in process() localVariable
2158 .copy_name_to_slice(&mut self.name[pos..pos + LongDirEntry::LONG_NAME_STR_LEN])?; in process()