Home
last modified time | relevance | path

Searched refs:n (Results 1 – 21 of 21) sorted by relevance

/DragonOS-0.1.8/kernel/src/common/
Dlist.h221 #define list_for_each_safe(ptr, n, head) \ argument
222 for ((ptr) = (head)->next, (n) = (ptr)->next; (ptr) != (head); (ptr) = n, n = (ptr)->next)
232 #define list_for_each_prev_safe(ptr, n, head) \ argument
233 for ((ptr) = (head)->prev, (n) = (ptr)->prev; (ptr) != (head); (ptr) = n, n = (ptr)->prev)
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); \
258 pos = n, n = list_next_entry(n, member))
302 #define list_for_each_entry_safe_continue(pos, n, head, member) \ argument
303 for (pos = list_next_entry(pos, member), n = list_next_entry(pos, member); \
305 pos = n, n = list_next_entry(n, member))
[all …]
Dcompletion.h30 void wait_for_multicompletion(struct completion x[], int n);
/DragonOS-0.1.8/kernel/src/exception/
Dgate.h100 void set_tss_descriptor(unsigned int n, void *addr) in set_tss_descriptor() argument
105 …*(unsigned long *)(phys_2_virt(GDT_Table + n)) = (limit & 0xffff) | (((unsigned long)addr & 0xffff… in set_tss_descriptor()
106 …*(unsigned long *)(phys_2_virt(GDT_Table + n + 1)) = (((unsigned long)addr >> 32) & 0xffffffff) | … in set_tss_descriptor()
114 #define load_TR(n) \ argument
117 __asm__ __volatile__("ltr %%ax" ::"a"((n) << 3)); \
127 void set_intr_gate(unsigned int n, unsigned char ist, void *addr) in set_intr_gate() argument
129 _set_gate(phys_2_virt(IDT_Table + n), 0x8E, ist, addr); // p=1,DPL=0, type=E in set_intr_gate()
141 void set_trap_gate(unsigned int n, unsigned char ist, void *addr) in set_trap_gate() argument
146 _set_gate(phys_2_virt(IDT_Table + n), 0x8F, ist, addr); // p=1,DPL=0, type=F in set_trap_gate()
156 void set_system_trap_gate(unsigned int n, unsigned char ist, void *addr) in set_system_trap_gate() argument
[all …]
/DragonOS-0.1.8/kernel/src/libs/
Dstdlib.c15 unsigned long n = neg ? -input : input; in ltoa() local
20 *pos-- = '0' + n % 10; in ltoa()
21 n /= 10; in ltoa()
24 } while (n); in ltoa()
Dkeyboard_parser.rs83 TypeOneFSMState::PauseBreak(n) => { in parse()
84 return self.handle_pause_break(*n, scancode_status, tty); in parse()
92 TypeOneFSMState::PrtscPress(n) => { in parse()
93 return self.handle_prtsc_press(*n, scancode_status, tty) in parse()
95 TypeOneFSMState::PrtscRelease(n) => { in parse()
96 return self.handle_prtsc_release(*n, scancode_status, tty) in parse()
Dlz4.c198 void *LZ4_calloc(size_t n, size_t s);
/DragonOS-0.1.8/user/libs/libc/src/
Dstdlib.c26 int n = 0, neg = 0; in atoi() local
46 n = 10 * n - (*str++ - '0'); in atoi()
49 return neg ? n : -n; in atoi()
/DragonOS-0.1.8/user/apps/shell/
Dcmd_test.c12 int fd[2], i, n; in shell_pipe_test() local
33 n = read(fd[0], buf, buf_SIZE); // 从管道的读端读取一条消息 in shell_pipe_test()
34 if (n > 0) in shell_pipe_test()
69 n = strlen(msg); in shell_pipe_test()
72 write(fd[1], msg, n); // 向管道的写端写入一条消息 in shell_pipe_test()
/DragonOS-0.1.8/docs/kernel/memory_management/
Dmmio.md27 3. `mmio_create`对申请的地址空间大小按照2的n次幂进行对齐,然后从buddy中申请内存地址空间
61 &emsp;&emsp;伙伴(buddy)算法的作用是维护以及组织大块连续内存块的分配和回收,以减少系统时运行产生的外部碎片。伙伴系统中的每个内存块的大小均为$2^n$。 在DragonOS中,伙伴…
63 …时,每次都分配比申请的内存大小更大的最小内存块,同时分配出去的内存块大小为$2^nB$。(e.g. 假设某应用申请了$3B$内存,显然并没有整数值n,使$2^n = 3$ ,且$3 \in [2^…
158n}$ bytes,那么可以令$exp = n$。index与exp的换算公式如下:$index = exp - 12$。e.g. 一个大小为$2^{12}$ bytes的内存块,其$exp = …
Dallocate-memory.md17 …ckedFrameAllocator`的`allocate()`函数,能够分配在物理地址上连续的页帧。请注意,由于底层使用的是buddy分配器,因此页帧数目必须是2的n次幂,且最大大小不超过1GB。
/DragonOS-0.1.8/docs/kernel/sched/
Dkernel_timer.md99 #### 4.2.4. 计算接下来n毫秒或者微秒对应的定时器时间片
109 &emsp;&emsp;计算接下来n**毫秒**对应的定时器时间片
113 - expire_ms:n毫秒
127 &emsp;&emsp;计算接下来n**微秒**对应的定时器时间片
131 - expire_ms:n微秒
Dc_waiting.md184 | wait_for_multicompletion(struct completion x[], int n)| 将当前进程挂起,并设置挂起状态为PROC_UNINTERRUPTIBLE。(等待数…
/DragonOS-0.1.8/kernel/src/mm/allocator/
Dpage_frame.rs31 pub fn next_by(&self, n: usize) -> Self { in next_by()
33 number: self.number + n, in next_by()
95 pub fn next_by(&self, n: usize) -> Self { in next_by()
97 number: self.number + n, in next_by()
113 pub fn add(&self, n: PageFrameCount) -> Self { in add()
115 number: self.number + n.data(), in add()
/DragonOS-0.1.8/docs/introduction/
Dbuild_system.md142 echo -e "[source.crates-io] \n \
143 registry = \"https://github.com/rust-lang/crates.io-index\" \n \
144 \n \
145 replace-with = 'dragonos-gitee' \n \
146 [source.dragonos-gitee] \n \
147 registry = \"https://gitee.com/DragonOS/crates.io-index.git\" \n \
/DragonOS-0.1.8/docs/kernel/core_api/
Dkernel_api.md244 ### `list_for_each_safe(ptr, n, head)`
258 **n** argument
266 ### `list_for_each_prev_safe(ptr, n, head)`
309 ### `list_for_each_entry_safe(pos, n, head, member)`
321 **n** argument
395 ### `list_for_each_entry_safe_continue(pos, n, head, member)`
407 **n** argument
419 ### `list_for_each_entry_safe_continue_reverse(pos, n, head, member)`
429 ### `list_for_each_entry_safe_from(pos, n, head, member)` argument
/DragonOS-0.1.8/tools/
Dcreate_hdd_image.sh18 n
/DragonOS-0.1.8/kernel/src/net/
Dsyscall.rs245 let (n, endpoint) = socket.read(buf); in recvfrom()
248 let n: usize = n?; in recvfrom() localVariable
257 return Ok(n); in recvfrom()
278 let (n, endpoint) = socket.read(&mut buf); in recvmsg()
281 let n: usize = n?; in recvmsg() localVariable
284 iovs.scatter(&buf[..n]); in recvmsg()
290 return Ok(n); in recvmsg()
/DragonOS-0.1.8/kernel/src/sched/
Dcompletion.c199 void wait_for_multicompletion(struct completion x[], int n) in wait_for_multicompletion() argument
201 for (int i = 0; i < n; i++) // 对每一个completion都等一遍 in wait_for_multicompletion()
/DragonOS-0.1.8/kernel/src/driver/tty/
Dtty_device.rs165 TtyError::EOF(n) => { in read_at()
166 return Ok(n); in read_at()
/DragonOS-0.1.8/kernel/src/filesystem/fat/
Dfs.rs760 pub fn get_cluster_by_relative(&self, start_cluster: Cluster, n: usize) -> Option<Cluster> { in get_cluster_by_relative()
761 return self.cluster_iter(start_cluster).skip(n).next(); in get_cluster_by_relative()
1262 n => return Some(n as u64), in count_free_cluster()
1294 n => return Some(n as u64), in next_free()
Dentry.rs2242 n if n == self.last_index => { in next()
2244 let ord: u8 = n | 0x40; in next()
2245 let start_idx = ((n - 1) * 13) as usize; in next()
2253 n => { in next()
2255 let start_idx = ((n - 1) * 13) as usize; in next()
2258 n, in next()