⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 do_memset.c

📁 Minix3.11的源码。[MINIX 3是一个为高可靠性应用而设计的自由且简洁的类UNIX系统。]
💻 C
字号:
/* The kernel call implemented in this file: *   m_type:	SYS_MEMSET * * The parameters for this kernel call are: *    m2_p1:	MEM_PTR		(virtual address)	 *    m2_l1:	MEM_COUNT	(returns physical address)	 *    m2_l2:	MEM_PATTERN	(size of datastructure) 	 */#include "../system.h"#if USE_MEMSET/*===========================================================================* *				do_memset				     * *===========================================================================*/PUBLIC int do_memset(m_ptr)register message *m_ptr;{/* Handle sys_memset(). This writes a pattern into the specified memory. */  unsigned long p;  unsigned char c = m_ptr->MEM_PATTERN;  p = c | (c << 8) | (c << 16) | (c << 24);  phys_memset((phys_bytes) m_ptr->MEM_PTR, p, (phys_bytes) m_ptr->MEM_COUNT);  return(OK);}#endif /* USE_MEMSET */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -