Ignore:
Timestamp:
2017-08-20T14:53:21Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3f74275
Parents:
49115ac
Message:

Hide kobject implementation details

File:
1 edited

Legend:

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

    r49115ac re7ac23d0  
    4242#define MAX_KERNEL_OBJECTS  64
    4343
     44#define for_each_kobject(task, ko, type) \
     45        for (int i = 0, l = 1; i < MAX_KERNEL_OBJECTS && l; i++) \
     46                for (kobject_t *(ko) = kobject_get((task), i, (type)); \
     47                    (ko) && !(l = 0); (ko) = NULL, l = 1)
     48
     49#define for_each_kobject_current(ko, type) \
     50        for_each_kobject(TASK, (ko), (type))
     51
    4452typedef enum {
    4553        KOBJECT_TYPE_INVALID,
     
    6169struct task;
    6270
     71void kobject_task_alloc(struct task *);
     72void kobject_task_free(struct task *);
     73void kobject_task_init(struct task *);
     74
    6375extern void kobject_initialize(kobject_t *);
    6476extern kobject_t *kobject_get(struct task *, int, kobject_type_t);
     
    6779extern void kobject_free(struct task *, int);
    6880
     81extern int kobject_to_cap(struct task *, kobject_t *);
     82
    6983#endif
    7084
Note: See TracChangeset for help on using the changeset viewer.