mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 02:43:15 +01:00
Support for capability replicate, share, grant, deduce, and split. The code builds, but hasn't been tested.
31 lines
809 B
C
31 lines
809 B
C
/*
|
|
* Syscall API for capability manipulation
|
|
*
|
|
* Copyright (C) 2009 Bahadir Balban
|
|
*/
|
|
#ifndef __API_CAPABILITY_H__
|
|
#define __API_CAPABILITY_H__
|
|
|
|
/* Capability syscall request types */
|
|
#define CAP_CONTROL_NCAPS 0x00000000
|
|
#define CAP_CONTROL_READ 0x00000001
|
|
#define CAP_CONTROL_SHARE 0x00000002
|
|
#define CAP_CONTROL_GRANT 0x00000003
|
|
#define CAP_CONTROL_REPLICATE 0x00000005
|
|
#define CAP_CONTROL_SPLIT 0x00000006
|
|
#define CAP_CONTROL_DEDUCE 0x00000007
|
|
|
|
#define CAP_SHARE_MASK 0x00000003
|
|
#define CAP_SHARE_SINGLE 0x00000001
|
|
#define CAP_SHARE_ALL 0x00000002
|
|
|
|
#define CAP_GRANT_MASK 0x00000003
|
|
#define CAP_GRANT_SINGLE 0x00000001
|
|
#define CAP_GRANT_ALL 0x00000002
|
|
|
|
/* Task's primary capability list */
|
|
#define TASK_CAP_LIST(task) \
|
|
(&((task)->space->cap_list))
|
|
|
|
#endif /* __API_CAPABILITY_H__ */
|