linux同款panic二维码

This commit is contained in:
2026-04-21 20:28:37 +08:00
parent ad77805f7f
commit 5c7d66e3a6
17 changed files with 5201 additions and 4 deletions

View File

@@ -29,4 +29,34 @@ int memcmp(const void *left, const void *right, usize count) {
int bcmp(const void *left, const void *right, usize count) {
return memcmp(left, right, count);
}
}
usize strlen(const char *str) {
return clks_strlen(str);
}
char *strchr(const char *str, int c) {
char ch = (char)c;
const char *cur = str;
while (*cur != '\0') {
if (*cur == ch) {
return (char *)cur;
}
cur++;
}
if (ch == '\0') {
return (char *)cur;
}
return (char *)0;
}
int abs(int value) {
return (value < 0) ? -value : value;
}
long labs(long value) {
return (value < 0L) ? -value : value;
}