summaryrefslogtreecommitdiff
path: root/src/include/gc/syscall.h
blob: a8928e32fcf8659d396a984627bfc43f8ca37723 (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
#ifndef DEF_SYSCALL_H
#define DEF_SYSCALL_H

typedef unsigned long long	uint64_t;
typedef unsigned int		uint32_t;
typedef unsigned short		uint16_t;
typedef unsigned char		uint8_t;
typedef long long	int64_t;
typedef int 		int32_t;
typedef short		int16_t;
typedef char		int8_t;

typedef unsigned size_t;

struct user_request {
	uint32_t func, params[3], shmsize[3];
	int isBlocking;		// 1 : blocking request, 0 : nonblocking request (message)
	int pid;	//pid of caller process
};

struct user_sendrequest {
	uint32_t func, a, b, c;
	uint32_t answeri;
	int64_t answerll;
	int errcode;
};

#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();

int proc_setheap(size_t start, size_t end);
int shm_create(size_t offset, size_t length);
int shm_delete(size_t offset);

#endif