Rev 1278 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1278 | Rev 1297 | ||
---|---|---|---|
Line 39... | Line 39... | ||
39 | */ |
39 | */ |
40 | 40 | ||
41 | #ifndef __CAP_H__ |
41 | #ifndef __CAP_H__ |
42 | #define __CAP_H__ |
42 | #define __CAP_H__ |
43 | 43 | ||
- | 44 | #include <syscall/sysarg64.h> |
|
44 | #include <arch/types.h> |
45 | #include <arch/types.h> |
45 | #include <typedefs.h> |
46 | #include <typedefs.h> |
46 | 47 | ||
47 | /** |
48 | /** |
48 | * CAP_CAP allows its holder to grant/revoke arbitrary |
49 | * CAP_CAP allows its holder to grant/revoke arbitrary |
Line 61... | Line 62... | ||
61 | * to other tasks. |
62 | * to other tasks. |
62 | */ |
63 | */ |
63 | #define CAP_IO_MANAGER (1<<2) |
64 | #define CAP_IO_MANAGER (1<<2) |
64 | 65 | ||
65 | /** |
66 | /** |
66 | * CAP_PREEMPT_CONTROL allows its holder to disable interrupts |
67 | * CAP_PREEMPT_CONTROL allows its holder to disable/enable preemption. |
67 | */ |
68 | */ |
68 | #define CAP_PREEMPT_CONTROL (1<<3) |
69 | #define CAP_PREEMPT_CONTROL (1<<3) |
- | 70 | ||
- | 71 | /** |
|
- | 72 | * CAP_IRQ_REG entitles its holder to register IRQ handlers. |
|
- | 73 | */ |
|
- | 74 | #define CAP_IRQ_REG (1<<4) |
|
69 | 75 | ||
70 | typedef __u32 cap_t; |
76 | typedef __u32 cap_t; |
71 | 77 | ||
72 | extern void cap_set(task_t *t, cap_t caps); |
78 | extern void cap_set(task_t *t, cap_t caps); |
73 | extern cap_t cap_get(task_t *t); |
79 | extern cap_t cap_get(task_t *t); |
74 | 80 | ||
- | 81 | extern __native sys_cap_grant(sysarg64_t *uspace_taskid_arg, cap_t caps); |
|
- | 82 | extern __native sys_cap_revoke(sysarg64_t *uspace_taskid_arg, cap_t caps); |
|
- | 83 | ||
75 | #endif |
84 | #endif |