1 |
2 |
drasko |
/*
|
2 |
|
|
* Syscall offsets in the syscall page.
|
3 |
|
|
*
|
4 |
|
|
* Copyright (C) 2007 Bahadir Balban
|
5 |
|
|
*/
|
6 |
|
|
#ifndef __SYSCALL_H__
|
7 |
|
|
#define __SYSCALL_H__
|
8 |
|
|
|
9 |
|
|
#include INC_GLUE(syscall.h)
|
10 |
|
|
#include INC_API(exregs.h)
|
11 |
|
|
#include <l4/generic/time.h>
|
12 |
|
|
|
13 |
|
|
#define syscall_offset_mask 0xFF
|
14 |
|
|
|
15 |
|
|
#define sys_ipc_offset 0x0
|
16 |
|
|
#define sys_thread_switch_offset 0x4
|
17 |
|
|
#define sys_thread_control_offset 0x8
|
18 |
|
|
#define sys_exchange_registers_offset 0xC
|
19 |
|
|
#define sys_schedule_offset 0x10
|
20 |
|
|
#define sys_unmap_offset 0x14
|
21 |
|
|
#define sys_irq_control_offset 0x18
|
22 |
|
|
#define sys_ipc_control_offset 0x1C
|
23 |
|
|
#define sys_map_offset 0x20
|
24 |
|
|
#define sys_getid_offset 0x24
|
25 |
|
|
#define sys_capability_control_offset 0x28
|
26 |
|
|
#define sys_container_control_offset 0x2C
|
27 |
|
|
#define sys_time_offset 0x30
|
28 |
|
|
#define sys_mutex_control_offset 0x34
|
29 |
|
|
#define sys_cache_control_offset 0x38
|
30 |
|
|
#define syscalls_end_offset sys_cache_control_offset
|
31 |
|
|
#define SYSCALLS_TOTAL ((syscalls_end_offset >> 2) + 1)
|
32 |
|
|
|
33 |
|
|
void print_syscall_context(struct ktcb *t);
|
34 |
|
|
|
35 |
|
|
int sys_ipc(l4id_t to, l4id_t from, unsigned int flags);
|
36 |
|
|
int sys_thread_switch(void);
|
37 |
|
|
int sys_thread_control(unsigned int flags, struct task_ids *ids);
|
38 |
|
|
int sys_exchange_registers(struct exregs_data *exregs, l4id_t tid);
|
39 |
|
|
int sys_schedule(void);
|
40 |
|
|
int sys_unmap(unsigned long virtual, unsigned long npages, unsigned int tid);
|
41 |
|
|
int sys_irq_control(unsigned int req, unsigned int flags, l4id_t id);
|
42 |
|
|
int sys_ipc_control(void);
|
43 |
|
|
int sys_map(unsigned long phys, unsigned long virt, unsigned long npages,
|
44 |
|
|
unsigned int flags, l4id_t tid);
|
45 |
|
|
int sys_getid(struct task_ids *ids);
|
46 |
|
|
int sys_capability_control(unsigned int req, unsigned int flags, void *addr);
|
47 |
|
|
int sys_container_control(unsigned int req, unsigned int flags, void *addr);
|
48 |
|
|
int sys_time(struct timeval *tv, int set);
|
49 |
|
|
int sys_mutex_control(unsigned long mutex_address, int mutex_op);
|
50 |
|
|
int sys_cache_control(unsigned long start, unsigned long end,
|
51 |
|
|
unsigned int flags);
|
52 |
|
|
|
53 |
|
|
#endif /* __SYSCALL_H__ */
|