Changeset 455241b in mainline for kernel/generic/include/cap/cap.h


Ignore:
Timestamp:
2025-01-16T19:29:20Z (13 days ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Children:
74353920
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)
Message:

Integrate kobject_t into target structures

This just means fewer allocations and indirections.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/cap/cap.h

    rdf721df r455241b  
    6060} kobject_type_t;
    6161
    62 struct task;
    63 
    64 struct call;
    65 struct irq;
    66 struct phone;
    67 struct waitq;
     62struct kobject;
    6863
    6964typedef struct kobject_ops {
    70         void (*destroy)(void *);
     65        void (*destroy)(struct kobject *);
    7166} kobject_ops_t;
    7267
     
    7772/*
    7873 * Everything in kobject_t except for the atomic reference count, the capability
    79  * list and its lock is imutable.
     74 * list and its lock is immutable.
    8075 */
    8176typedef struct kobject {
     
    8782        /** List of published capabilities associated with the kobject */
    8883        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         };
    9784} kobject_t;
    9885
     
    141128extern void cap_free(struct task *, cap_handle_t);
    142129
    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 *);
     130extern void kobject_initialize(kobject_t *, kobject_type_t);
    146131extern kobject_t *kobject_get(struct task *, cap_handle_t, kobject_type_t);
    147132extern void kobject_add_ref(kobject_t *);
Note: See TracChangeset for help on using the changeset viewer.