Changeset 455241b in mainline for kernel/generic/include
- Timestamp:
- 2025-01-16T19:29:20Z (6 months ago)
- Children:
- 162ad53
- Parents:
- df721df
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2025-01-16 19:23:14)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2025-01-16 19:29:20)
- Location:
- kernel/generic/include
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/cap/cap.h
rdf721df r455241b 60 60 } kobject_type_t; 61 61 62 struct task; 63 64 struct call; 65 struct irq; 66 struct phone; 67 struct waitq; 62 struct kobject; 68 63 69 64 typedef struct kobject_ops { 70 void (*destroy)( void*);65 void (*destroy)(struct kobject *); 71 66 } kobject_ops_t; 72 67 … … 77 72 /* 78 73 * Everything in kobject_t except for the atomic reference count, the capability 79 * list and its lock is im utable.74 * list and its lock is immutable. 80 75 */ 81 76 typedef struct kobject { … … 87 82 /** List of published capabilities associated with the kobject */ 88 83 list_t caps_list; 89 90 union {91 void *raw;92 struct call *call;93 struct irq *irq;94 struct phone *phone;95 struct waitq *waitq;96 };97 84 } kobject_t; 98 85 … … 141 128 extern void cap_free(struct task *, cap_handle_t); 142 129 143 extern kobject_t *kobject_alloc(unsigned int); 144 extern void kobject_free(kobject_t *); 145 extern void kobject_initialize(kobject_t *, kobject_type_t, void *); 130 extern void kobject_initialize(kobject_t *, kobject_type_t); 146 131 extern kobject_t *kobject_get(struct task *, cap_handle_t, kobject_type_t); 147 132 extern void kobject_add_ref(kobject_t *); -
kernel/generic/include/ddi/irq.h
rdf721df r455241b 132 132 extern hash_table_t irq_uspace_hash_table; 133 133 134 extern slab_cache_t *irq_cache;135 136 134 extern inr_t last_inr; 137 135 -
kernel/generic/include/ipc/ipc.h
rdf721df r455241b 74 74 /** User-defined label */ 75 75 sysarg_t label; 76 kobject_t *kobject;76 kobject_t kobject; 77 77 } phone_t; 78 78 … … 108 108 109 109 typedef struct call { 110 kobject_t *kobject;110 kobject_t kobject; 111 111 112 112 /** … … 169 169 170 170 extern slab_cache_t *phone_cache; 171 extern slab_cache_t *irq_cache; 171 172 172 173 extern answerbox_t *ipc_box_0; 173 174 174 175 extern kobject_ops_t call_kobject_ops; 176 177 static inline phone_t *phone_from_kobject(kobject_t *kobject) 178 { 179 if (kobject) 180 return ((void *) kobject) - offsetof(phone_t, kobject); 181 else 182 return NULL; 183 } 184 185 static inline call_t *call_from_kobject(kobject_t *kobject) 186 { 187 if (kobject) 188 return ((void *) kobject) - offsetof(call_t, kobject); 189 else 190 return NULL; 191 } 175 192 176 193 extern void ipc_init(void); -
kernel/generic/include/ipc/irq.h
rdf721df r455241b 50 50 extern kobject_ops_t irq_kobject_ops; 51 51 52 typedef struct { 53 kobject_t kobject; 54 irq_t irq; 55 } irq_kobject_t; 56 57 static inline irq_t *irq_from_kobject(kobject_t *kobject) 58 { 59 if (kobject) { 60 return &((irq_kobject_t *) kobject)->irq; 61 } else { 62 return NULL; 63 } 64 } 65 52 66 extern irq_ownership_t ipc_irq_top_half_claim(irq_t *); 53 67 extern void ipc_irq_top_half_handler(irq_t *);
Note:
See TracChangeset
for help on using the changeset viewer.