aboutsummaryrefslogtreecommitdiff
path: root/src/lib/include
diff options
context:
space:
mode:
authorAlex Auvolat <alex.auvolat@ens.fr>2015-02-19 18:25:29 +0100
committerAlex Auvolat <alex.auvolat@ens.fr>2015-02-19 18:25:29 +0100
commit277b329c5609b8172ad0c142117edfa9a08279da (patch)
tree23dc957e64e5b67e61072516bea30d650ffcefdd /src/lib/include
parent408faed4df730384538aaa0e338ae8ea7abe400d (diff)
downloadkogata-277b329c5609b8172ad0c142117edfa9a08279da.tar.gz
kogata-277b329c5609b8172ad0c142117edfa9a08279da.zip
Implement basic syscalls...
Diffstat (limited to 'src/lib/include')
-rw-r--r--src/lib/include/syscall.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/lib/include/syscall.h b/src/lib/include/syscall.h
index e0f08eb..3d9fcd5 100644
--- a/src/lib/include/syscall.h
+++ b/src/lib/include/syscall.h
@@ -10,14 +10,31 @@
#include <fs.h>
#include <debug.h>
+typedef int fd_t;
+
void dbg_print(const char* str);
void yield();
void exit(int code);
bool mmap(void* addr, size_t size, int mode);
+bool mmap_file(fd_t file, size_t offset, void* addr, size_t size, int mode);
bool mchmap(void* addr, int mode);
bool munmap(void* addr);
+bool create(const char* name, int type);
+bool delete(const char* name);
+bool move(const char* oldname, const char* newname);
+bool stat(const char* name, stat_t *s);
+int ioctl(const char* filename, int command, void* data);
+
+fd_t open(const char* name, int mode);
+void close(fd_t file);
+size_t read(fd_t file, size_t offset, size_t len, char *buf);
+size_t write(fd_t file, size_t offset, size_t len, const char* buf);
+bool readdir(fd_t file, dirent_t *d);
+bool stat_open(fd_t file, stat_t *s);
+int get_mode(fd_t file);
+
// more todo
/* vim: set ts=4 sw=4 tw=0 noet :*/