xv6-riscv-kernel/user/user.h

47 lines
1.1 KiB
C
Raw Normal View History

#pragma once
#include "../kernel/types.h"
2007-08-28 06:20:25 +02:00
struct stat;
2006-09-06 03:25:41 +02:00
// system calls
2024-06-15 16:55:06 +02:00
int fork(void);
int exit(int) __attribute__((noreturn));
int wait(int *);
int pipe(int *);
int write(int, const void *, int);
int read(int, void *, int);
int close(int);
int kill(int);
int exec(const char *, char **);
int open(const char *, int);
int mknod(const char *, short, short);
int unlink(const char *);
int fstat(int fd, struct stat *);
int link(const char *, const char *);
int mkdir(const char *);
int chdir(const char *);
int dup(int);
int getpid(void);
char *sbrk(int);
int sleep(int);
int uptime(void);
int trace(int);
2006-09-06 03:25:41 +02:00
// ulib.c
2024-06-15 16:55:06 +02:00
int stat(const char *, struct stat *);
char *strcpy(char *, const char *);
void *memmove(void *, const void *, int);
char *strchr(const char *, char c);
int strcmp(const char *, const char *);
void fprintf(int, const char *, ...);
void printf(const char *, ...);
char *gets(char *, int max);
u32 strlen(const char *);
void *memset(void *, int, u32);
void *malloc(u32);
void free(void *);
int atoi(const char *);
int memcmp(const void *, const void *, u32);
2024-05-24 11:26:40 +02:00
void *memcpy(void *, const void *, u32);