Changeset 6caf5fb in mainline for kernel/generic/include/cap/cap.h
- Timestamp:
- 2025-01-16T21:42:15Z (20 hours ago)
- Parents:
- e0e2264 (diff), 455241b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2025-01-16 21:42:15)
- git-committer:
- GitHub <noreply@…> (2025-01-16 21:42:15)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/cap/cap.h
re0e2264 r6caf5fb 37 37 38 38 #include <abi/cap.h> 39 #include <adt/hash_table.h> 40 #include <adt/hash.h> 41 #include <adt/list.h> 42 #include <atomic.h> 43 #include <lib/ra.h> 44 #include <lib/refcount.h> 45 #include <synch/mutex.h> 39 46 #include <typedefs.h> 40 #include <adt/list.h>41 #include <adt/hash.h>42 #include <adt/hash_table.h>43 #include <lib/ra.h>44 #include <synch/mutex.h>45 #include <atomic.h>46 47 47 48 typedef enum { … … 59 60 } kobject_type_t; 60 61 61 struct task; 62 63 struct call; 64 struct irq; 65 struct phone; 66 struct waitq; 62 struct kobject; 67 63 68 64 typedef struct kobject_ops { 69 void (*destroy)( void*);65 void (*destroy)(struct kobject *); 70 66 } kobject_ops_t; 71 67 … … 76 72 /* 77 73 * Everything in kobject_t except for the atomic reference count, the capability 78 * list and its lock is im utable.74 * list and its lock is immutable. 79 75 */ 80 76 typedef struct kobject { 81 77 kobject_type_t type; 82 atomic_ size_t refcnt;78 atomic_refcount_t refcnt; 83 79 84 80 /** Mutex protecting caps_list */ … … 86 82 /** List of published capabilities associated with the kobject */ 87 83 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 };96 84 } kobject_t; 97 85 … … 129 117 extern errno_t caps_task_alloc(struct task *); 130 118 extern void caps_task_free(struct task *); 131 extern void caps_task_init(struct task *); 119 extern void caps_task_clear(struct task *task); 120 extern errno_t caps_task_init(struct task *); 132 121 extern bool caps_apply_to_kobject_type(struct task *, kobject_type_t, 133 122 bool (*)(cap_t *, void *), void *); … … 139 128 extern void cap_free(struct task *, cap_handle_t); 140 129 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 *); 130 extern void kobject_initialize(kobject_t *, kobject_type_t); 144 131 extern kobject_t *kobject_get(struct task *, cap_handle_t, kobject_type_t); 145 132 extern void kobject_add_ref(kobject_t *);
Note:
See TracChangeset
for help on using the changeset viewer.