summaryrefslogtreecommitdiff
path: root/src/include/tce/syscalls.h
blob: f32c225811ed15f6f778cef9f09a06afa97dc6cd (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef DEF_TCE_SYSCALLS_H
#define DEF_TCE_SYSCALLS_H

#define SC_THREAD_EXIT 1
#define SC_SCHEDULE 2
#define SC_THREAD_SLEEP 3
#define SC_PROCESS_EXIT 4
#define SC_PRINTK 5
#define SC_THREAD_NEW 6
#define SC_IRQ_WAIT 7
#define SC_PROC_PRIV 8

#define SC_SBRK 10
#define SC_BRK 11
// NOT YET IMPLEMENTED
#define SC_MMAP 12
#define SC_MUNMAP 13

#define SC_RUN 14
#define SC_WAITPID 15

#define SC_OPEN 20
#define SC_OPEN_RELATIVE 21
#define SC_STAT 22
#define SC_STAT_RELATIVE 23
#define SC_STATF 24
#define SC_CLOSE 25
#define SC_READ 26
#define SC_WRITE 27
#define SC_LINK 28

#define EX_PAGEFAULT 4000
#define EX_EXCEPTION 4001
#define EX_NOTHREADS 4002
#define EX_INVALID 4003


// ERRORS
#define E_NOT_IMPLEMENTED	-1		// could also mean that your request is nonsense
#define E_NOT_FOUND			-2
#define E_INVALID_FD		-3
#define E_TOO_SHORT			-4		// not enough space for data to be copied to
#define E_INVALID_RANGE		-5
#define E_INVALID			-6		// anything went wrong - invalid parameter, usually
#define E_NOT_FINISHED		-7		// nonblocking waitpid on process that hasn't finished
#define E_INVALID_TYPE		-8		// incorrect node type

#endif