Changeset 05ffb41 in mainline for kernel/generic/include


Ignore:
Timestamp:
2017-08-17T19:11:14Z (8 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

Location:
kernel/generic/include
Files:
4 edited

Legend:

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

    r7e3826d9 r05ffb41  
    4343#include <typedefs.h>
    4444
    45 #define IPC_MAX_PHONES  64
    46 
    4745struct answerbox;
    4846struct task;
  • kernel/generic/include/ipc/ipcrsc.h

    r7e3826d9 r05ffb41  
    4040
    4141extern call_t *get_call(sysarg_t);
    42 extern int phone_get(sysarg_t, phone_t **);
     42extern phone_t *phone_get_current(int);
     43extern phone_t *phone_get(task_t *, int);
    4344extern int phone_alloc(task_t *);
    4445extern bool phone_connect(int, answerbox_t *);
  • 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);
  • kernel/generic/include/proc/task.h

    r7e3826d9 r05ffb41  
    105105        answerbox_t answerbox;
    106106
    107         /** Sending communication endpoints */
    108         phone_t phones[IPC_MAX_PHONES];
    109 
    110107        /** Spinlock protecting the active_calls list. */
    111108        SPINLOCK_DECLARE(active_calls_lock);
Note: See TracChangeset for help on using the changeset viewer.