Changeset e9d15d9 in mainline for kernel/generic/src/ipc/ipcrsc.c


Ignore:
Timestamp:
2017-08-18T21:15:26Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
24abb85d
Parents:
1c85bae
Message:

Turn IRQ structures into kernel objects

ipc_irq_subscribe() now returns a capability for the underlying IRQ kernel
object. ipc_irq_unsubscribe() can now be done only with a valid IRQ capability.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/ipc/ipcrsc.c

    r1c85bae re9d15d9  
    133133#include <assert.h>
    134134#include <abi/errno.h>
     135#include <kobject/kobject.h>
    135136
    136137/** Find call_t * in call table according to callid.
     
    198199 *
    199200 * @return  New phone capability.
    200  * @return  KOBJECT_INVALID_CAP if a new capability cannot be allocated.
     201 * @return  Negative error code if a new capability cannot be allocated.
    201202 */
    202203int phone_alloc(task_t *task)
    203204{
    204205        int cap = kobject_alloc(task);
    205         if (cap != KOBJECT_INVALID_CAP) {
     206        if (cap >= 0) {
    206207                irq_spinlock_lock(&task->lock, true);
    207208                kobject_t *kobj = &task->kobject[cap];
Note: See TracChangeset for help on using the changeset viewer.