summaryrefslogtreecommitdiff
path: root/src/user/lib/include/tce/syscall.h
blob: 028b544a855e1fe16b4c71d1191021ca45d16860 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef DEF_SYSCALL_H
#define DEF_SYSCALL_H

#include <types.h>
#include <tce/syscalls.h>
#include <tce/vfs.h>

#define NEW_STACK_SIZE 0x8000

void thread_exit();
void schedule();
void thread_sleep(int time);
void process_exit(int retval);
void printk(char* str);
void thread_new(void (*entry)(void*), void *data);
void irq_wait(int number);
int proc_priv();

void* sbrk(size_t size);
void brk(void* ptr);

FILE open(char* filename, int mode);
FILE open_relative(FILE root, char* filename, int mode);
int stat(char* filename, file_info *info);
int stat_relative(FILE root, char* filename, file_info *info);
int statf(FILE file, file_info *info);
void close(FILE file);
int read(FILE file, size_t offset, size_t len, char *buffer);
int write(FILE file, size_t offset, size_t len, char *buffer);
int link(char* from, char* to, int mode);

#endif