more userlaand stuff
This commit is contained in:
0
libc/arch/i686/crt0.S
Normal file
0
libc/arch/i686/crt0.S
Normal file
17
libc/include/rock.h
Normal file
17
libc/include/rock.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef LIBC_ROCK_H
|
||||
#define LIBC_ROCK_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
static inline int32_t syscall(int num, uint32_t arg1, uint32_t arg2, uint32_t arg3) {
|
||||
int32_t ret;
|
||||
__asm__ __volatile__ (
|
||||
"int $0x80"
|
||||
: "=a" (ret)
|
||||
: "0" (num), "b" (arg1), "c" (arg2), "d" (arg3)
|
||||
: "memory"
|
||||
);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif
|
||||
11
libc/include/string.h
Normal file
11
libc/include/string.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#ifndef LIBC_STRING_H
|
||||
#define LIBC_STRING_H
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
void* memcpy(void* dst, const void* src, size_t n);
|
||||
void* memset(void* dst, int c, size_t n);
|
||||
void* memmove(void* dst, const void* src, size_t n);
|
||||
int memcmp(const void* s1, const void* s2, size_t n);
|
||||
|
||||
#endif
|
||||
0
libc/makefile
Normal file
0
libc/makefile
Normal file
Reference in New Issue
Block a user