mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-19 00:46:31 +00:00
🆕 完成了初始化内存管理单元的代码
This commit is contained in:
@ -114,8 +114,9 @@ static inline int strlen(char *s)
|
||||
|
||||
|
||||
|
||||
inline void *memset(void *dst, unsigned char C, ul Count)
|
||||
void *memset(void *dst, unsigned char C, ul Count)
|
||||
{
|
||||
|
||||
int d0, d1;
|
||||
unsigned long tmp = C * 0x0101010101010101UL;
|
||||
__asm__ __volatile__("cld \n\t"
|
||||
@ -136,3 +137,10 @@ inline void *memset(void *dst, unsigned char C, ul Count)
|
||||
: "memory");
|
||||
return dst;
|
||||
}
|
||||
void *memset_c(void *dst, unsigned char c, ul n)
|
||||
{
|
||||
unsigned char *s = (unsigned char *)dst;
|
||||
for(int i=0;i<n;++i)
|
||||
s[i] = c;
|
||||
return dst;
|
||||
}
|
Reference in New Issue
Block a user