Ignore:
Timestamp:
2017-08-17T19:11:14Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1c85bae
Parents:
7e3826d9
Message:

Turn IPC phones into kobjects

File:
1 edited

Legend:

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

    r7e3826d9 r05ffb41  
    3737
    3838#include <typedefs.h>
     39#include <ipc/ipc.h>
    3940
    4041#define MAX_KERNEL_OBJECTS  64
     
    4445typedef enum {
    4546        KOBJECT_TYPE_INVALID,
    46         KOBJECT_TYPE_ALLOCATED
     47        KOBJECT_TYPE_ALLOCATED,
     48        KOBJECT_TYPE_PHONE
    4749} kobject_type_t;
    4850
    49 typedef struct {
     51typedef struct kobject {
    5052        kobject_type_t type;
     53        bool (* can_reclaim)(struct kobject *);
     54
    5155        union {
     56                phone_t phone;
    5257        };
    5358} kobject_t;
    5459
    55 extern kobject_t *kobject_get_local(int, kobject_type_t);
     60struct task;
    5661
    57 struct task;
     62extern void kobject_init(kobject_t *);
     63extern kobject_t *kobject_get(struct task *, int, kobject_type_t);
     64extern kobject_t *kobject_get_current(int, kobject_type_t);
    5865extern int kobject_alloc(struct task *);
    5966extern void kobject_free(struct task *, int);
Note: See TracChangeset for help on using the changeset viewer.