Changeset 84876aa4 in mainline for kernel/generic/src/cap/cap.c


Ignore:
Timestamp:
2019-11-15T13:46:34Z (4 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ecb7828
Parents:
b093a62 (diff), d548fc0 (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.
Message:

Merge master into gfx

Mainly to get XCW fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/cap/cap.c

    rb093a62 r84876aa4  
    8383#include <mm/slab.h>
    8484#include <adt/list.h>
     85#include <synch/syswaitq.h>
     86#include <ipc/ipcrsc.h>
     87#include <ipc/ipc.h>
     88#include <ipc/irq.h>
    8589
    8690#include <limits.h>
     
    9498static slab_cache_t *cap_cache;
    9599static slab_cache_t *kobject_cache;
     100
     101kobject_ops_t *kobject_ops[KOBJECT_TYPE_MAX] = {
     102        [KOBJECT_TYPE_CALL] = &call_kobject_ops,
     103        [KOBJECT_TYPE_IRQ] = &irq_kobject_ops,
     104        [KOBJECT_TYPE_PHONE] = &phone_kobject_ops,
     105        [KOBJECT_TYPE_WAITQ] = &waitq_kobject_ops
     106};
    96107
    97108static size_t caps_hash(const ht_link_t *item)
     
    412423 * @param type  Type of the kernel object.
    413424 * @param raw   Raw pointer to the encapsulated object.
    414  * @param ops   Pointer to kernel object operations for the respective type.
    415  */
    416 void kobject_initialize(kobject_t *kobj, kobject_type_t type, void *raw,
    417     kobject_ops_t *ops)
     425 */
     426void kobject_initialize(kobject_t *kobj, kobject_type_t type, void *raw)
    418427{
    419428        atomic_store(&kobj->refcnt, 1);
     
    424433        kobj->type = type;
    425434        kobj->raw = raw;
    426         kobj->ops = ops;
    427435}
    428436
     
    474482{
    475483        if (atomic_postdec(&kobj->refcnt) == 1) {
    476                 kobj->ops->destroy(kobj->raw);
     484                KOBJECT_OP(kobj)->destroy(kobj->raw);
    477485                kobject_free(kobj);
    478486        }
Note: See TracChangeset for help on using the changeset viewer.