/* sartoris system calls */
#ifndef SYSCALL
#define SYSCALL
#include sartoris/kernel.h
/* multitasking */
int create_task(int address, struct task *tsk, int *src, int init_size);
int destroy_task(int task_num);
/* threading */
int create_thread(int id, struct thread *thr);
int destroy_thread(int id);
int run_thread(int id);
int set_thread_run_perm(int thread, int perm);
int set_thread_run_mode(int priv, int mode);
/* interrupt handling */
int create_int_handler(int number, int thread, int nesting, int priority);
int destroy_int_handler(int number, int thread);
int ret_from_int(void);
/* message-passing */
int open_port(int port, int mode);
int close_port(int port);
int set_port_perm(int port, int task, int perm);
int set_port_mode(int port, int priv, int mode);
int send_msg(int to_address, int port, void *msg);
int get_msg(int port, void *msg, int *id);
int get_msg_count(int port);
/* memory sharing */
int share_mem(int target_task, void *addr, int size, int perms);
int claim_mem(int smo_id);
int read_mem(int smo_id, int off, int size, void *dest);
int write_mem(int smo_id, int off, int size, void *src);
int pass_mem(int smo_id, int target_task);
#endif