2009-05-22 23:48:49 +03:00
|
|
|
#ifndef __SOS_H
|
|
|
|
#define __SOS_H
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define KERNEL_MASK 0xfff
|
|
|
|
#define CAPTYPE_MASK 0xe00
|
|
|
|
#define CAPTYPE_ADMIN 0x000
|
|
|
|
#define CAPTYPE_RECEIVER 0x200
|
|
|
|
#define CAPTYPE_MEMORY 0x400
|
|
|
|
#define CAPTYPE_THREAD 0x600
|
|
|
|
#define CAPTYPE_PAGE 0x800
|
|
|
|
#define CAPTYPE_CAPABILITY 0xa00
|
|
|
|
#define CAPTYPE_CAPPAGE 0xc00
|
|
|
|
/*#define CAPTYPE_??? 0xe00*/
|
|
|
|
|
|
|
|
/* This works on all kernel capabilities. */
|
|
|
|
#define CAP_DEGRADE 0
|
|
|
|
|
|
|
|
/* Operations */
|
|
|
|
#define CAP_ADMIN_SCHEDULE 1
|
|
|
|
/* TODO: add priviledged operations. */
|
|
|
|
|
|
|
|
#define CAP_RECEIVER_SET_OWNER 1
|
|
|
|
#define CAP_RECEIVER_CREATE_CAPABILITY 2
|
|
|
|
#define CAP_RECEIVER_CREATE_CALL_CAPABILITY 3
|
|
|
|
|
|
|
|
#define CAP_MEMORY_CREATE 1
|
|
|
|
#define CAP_MEMORY_DESTROY 2
|
|
|
|
#define CAP_MEMORY_LIST 3
|
|
|
|
#define CAP_MEMORY_MAPPING 4
|
|
|
|
#define CAP_MEMORY_DROP 5
|
|
|
|
|
|
|
|
#define CAP_THREAD_RUN 1
|
|
|
|
#define CAP_THREAD_RUN_CONDITIONAL 2
|
|
|
|
#define CAP_THREAD_SLEEP 3
|
|
|
|
#define CAP_THREAD_GET_INFO 4 /* Details of this are arch-specific. */
|
|
|
|
#define CAP_THREAD_SET_INFO 5 /* Details of this are arch-specific. */
|
|
|
|
|
|
|
|
#define CAP_PAGE_MAP 1
|
|
|
|
#define CAP_PAGE_SHARE 2
|
|
|
|
#define CAP_PAGE_SHARE_COW 3
|
|
|
|
#define CAP_PAGE_FORGET 4
|
|
|
|
|
|
|
|
#define CAP_CAPABILITY_GET 1
|
|
|
|
#define CAP_CAPABILITY_SET_DEATH_NOTIFY 2
|
|
|
|
|
2009-05-24 13:22:22 +03:00
|
|
|
#define CAPPAGE_SIZE 113
|
2009-05-22 23:48:49 +03:00
|
|
|
#define CAP_CAPPAGE_SET 1
|
|
|
|
#define CAP_CAPPAGE_GET 2
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|