Changeset fc0de8c in mainline for kernel/generic/src/cap/cap.c
- Timestamp:
- 2019-10-14T15:30:30Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 46a8c3cd
- Parents:
- f1cd4b0
- git-author:
- Jakub Jermar <jakub@…> (2019-10-14 15:27:34)
- git-committer:
- Jakub Jermar <jakub@…> (2019-10-14 15:30:30)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/cap/cap.c
rf1cd4b0 rfc0de8c 83 83 #include <mm/slab.h> 84 84 #include <adt/list.h> 85 #include <synch/syswaitq.h> 86 #include <ipc/ipcrsc.h> 87 #include <ipc/ipc.h> 88 #include <ipc/irq.h> 85 89 86 90 #include <limits.h> … … 94 98 static slab_cache_t *cap_cache; 95 99 static slab_cache_t *kobject_cache; 100 101 kobject_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 }; 96 107 97 108 static size_t caps_hash(const ht_link_t *item) … … 412 423 * @param type Type of the kernel object. 413 424 * @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 */ 426 void kobject_initialize(kobject_t *kobj, kobject_type_t type, void *raw) 418 427 { 419 428 atomic_store(&kobj->refcnt, 1); … … 424 433 kobj->type = type; 425 434 kobj->raw = raw; 426 kobj->ops = ops;427 435 } 428 436 … … 474 482 { 475 483 if (atomic_postdec(&kobj->refcnt) == 1) { 476 kobj->ops->destroy(kobj->raw);484 KOBJECT_OP(kobj)->destroy(kobj->raw); 477 485 kobject_free(kobj); 478 486 }
Note:
See TracChangeset
for help on using the changeset viewer.