Changes in kernel/generic/include/cap/cap.h [455241b:31e15be] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/cap/cap.h
r455241b r31e15be 37 37 38 38 #include <abi/cap.h> 39 #include <typedefs.h> 40 #include <adt/list.h> 41 #include <adt/hash.h> 39 42 #include <adt/hash_table.h> 40 #include < adt/hash.h>41 #include < adt/list.h>43 #include <lib/ra.h> 44 #include <synch/mutex.h> 42 45 #include <atomic.h> 43 #include <lib/ra.h>44 #include <lib/refcount.h>45 #include <synch/mutex.h>46 #include <typedefs.h>47 46 48 47 typedef enum { … … 60 59 } kobject_type_t; 61 60 62 struct kobject; 61 struct task; 62 63 struct call; 64 struct irq; 65 struct phone; 66 struct waitq; 63 67 64 68 typedef struct kobject_ops { 65 void (*destroy)( struct kobject*);69 void (*destroy)(void *); 66 70 } kobject_ops_t; 67 71 … … 72 76 /* 73 77 * Everything in kobject_t except for the atomic reference count, the capability 74 * list and its lock is im mutable.78 * list and its lock is imutable. 75 79 */ 76 80 typedef struct kobject { 77 81 kobject_type_t type; 78 atomic_ refcount_t refcnt;82 atomic_size_t refcnt; 79 83 80 84 /** Mutex protecting caps_list */ … … 82 86 /** List of published capabilities associated with the kobject */ 83 87 list_t caps_list; 88 89 union { 90 void *raw; 91 struct call *call; 92 struct irq *irq; 93 struct phone *phone; 94 struct waitq *waitq; 95 }; 84 96 } kobject_t; 85 97 … … 117 129 extern errno_t caps_task_alloc(struct task *); 118 130 extern void caps_task_free(struct task *); 119 extern void caps_task_clear(struct task *task); 120 extern errno_t caps_task_init(struct task *); 131 extern void caps_task_init(struct task *); 121 132 extern bool caps_apply_to_kobject_type(struct task *, kobject_type_t, 122 133 bool (*)(cap_t *, void *), void *); … … 128 139 extern void cap_free(struct task *, cap_handle_t); 129 140 130 extern void kobject_initialize(kobject_t *, kobject_type_t); 141 extern kobject_t *kobject_alloc(unsigned int); 142 extern void kobject_free(kobject_t *); 143 extern void kobject_initialize(kobject_t *, kobject_type_t, void *); 131 144 extern kobject_t *kobject_get(struct task *, cap_handle_t, kobject_type_t); 132 145 extern void kobject_add_ref(kobject_t *);
Note:
See TracChangeset
for help on using the changeset viewer.