Ignore:
File:
1 edited

Legend:

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

    rc33f39f rcd529c4  
    7272typedef struct answerbox {
    7373        IRQ_SPINLOCK_DECLARE(lock);
    74 
    75         /** Answerbox is active until it enters cleanup. */
    76         bool active;
    7774       
    7875        struct task *task;
     
    109106
    110107typedef struct {
    111         /**
    112          * Task link.
    113          * Valid only when the call is not forgotten.
    114          * Protected by the task's active_calls_lock.
    115          */
    116         link_t ta_link;
    117 
    118         /** Answerbox link. */
    119         link_t ab_link;
     108        link_t link;
    120109       
    121110        unsigned int flags;
    122 
    123         /** Protects the forget member. */
    124         SPINLOCK_DECLARE(forget_lock);
    125 
    126         /**
    127          * True if the caller 'forgot' this call and donated it to the callee.
    128          * Forgotten calls are discarded upon answering (the answer is not
    129          * delivered) and answered calls cannot be forgotten. Forgotten calls
    130          * also do not figure on the task's active call list.
    131          *
    132          * We keep this separate from the flags so that it is not necessary
    133          * to take a lock when accessing them.
    134          */
    135         bool forget;
    136 
    137         /** True if the call is in the active list. */
    138         bool active;
    139111       
    140         /**
    141          * Identification of the caller.
    142          * Valid only when the call is not forgotten.
    143          */
     112        /** Identification of the caller. */
    144113        struct task *sender;
    145        
    146         /** Phone which was used to send the call. */
    147         phone_t *caller_phone;
    148114       
    149115        /** Private data to internal IPC. */
     
    152118        /** Data passed from/to userspace. */
    153119        ipc_data_t data;
    154 
    155         /** Method as it was sent in the request. */
    156         sysarg_t request_method;
    157 
     120       
    158121        /** Buffer for IPC_M_DATA_WRITE and IPC_M_DATA_READ. */
    159122        uint8_t *buffer;
     123       
     124        /*
     125         * The forward operation can masquerade the caller phone. For those
     126         * cases, we must keep it aside so that the answer is processed
     127         * correctly.
     128         */
     129        phone_t *caller_phone;
    160130} call_t;
    161131
     
    171141extern int ipc_forward(call_t *, phone_t *, answerbox_t *, unsigned int);
    172142extern void ipc_answer(answerbox_t *, call_t *);
    173 extern void _ipc_answer_free_call(call_t *, bool);
    174143
    175144extern void ipc_phone_init(phone_t *);
    176 extern bool ipc_phone_connect(phone_t *, answerbox_t *);
     145extern void ipc_phone_connect(phone_t *, answerbox_t *);
    177146extern int ipc_phone_hangup(phone_t *);
    178147
     
    182151extern void ipc_backsend_err(phone_t *, call_t *, sysarg_t);
    183152extern void ipc_answerbox_slam_phones(answerbox_t *, bool);
    184 extern void ipc_cleanup_call_list(answerbox_t *, list_t *);
     153extern void ipc_cleanup_call_list(list_t *);
    185154
    186155extern void ipc_print_task(task_id_t);
Note: See TracChangeset for help on using the changeset viewer.