Changeset 12ab886 in mainline


Ignore:
Timestamp:
2008-04-05T11:06:10Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1383356
Parents:
776f2e6
Message:

Fix initialization of answerbox→task in ipc_answerbox_init.
Contributed by Jiri Svoboda.

Location:
kernel/generic
Files:
3 edited

Legend:

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

    r776f2e6 r12ab886  
    283283
    284284extern void ipc_init(void);
    285 extern call_t * ipc_wait_for_call(answerbox_t *box, uint32_t usec, int flags);
    286 extern void ipc_answer(answerbox_t *box, call_t *request);
    287 extern int ipc_call(phone_t *phone, call_t *call);
    288 extern void ipc_call_sync(phone_t *phone, call_t *request);
    289 extern void ipc_phone_init(phone_t *phone);
    290 extern void ipc_phone_connect(phone_t *phone, answerbox_t *box);
    291 extern void ipc_call_free(call_t *call);
    292 extern call_t * ipc_call_alloc(int flags);
    293 extern void ipc_answerbox_init(answerbox_t *box);
    294 extern void ipc_call_static_init(call_t *call);
     285extern call_t * ipc_wait_for_call(answerbox_t *, uint32_t, int);
     286extern void ipc_answer(answerbox_t *, call_t *);
     287extern int ipc_call(phone_t *, call_t *);
     288extern void ipc_call_sync(phone_t *, call_t *);
     289extern void ipc_phone_init(phone_t *);
     290extern void ipc_phone_connect(phone_t *, answerbox_t *);
     291extern void ipc_call_free(call_t *);
     292extern call_t * ipc_call_alloc(int);
     293extern void ipc_answerbox_init(answerbox_t *, struct task *);
     294extern void ipc_call_static_init(call_t *);
    295295extern void task_print_list(void);
    296 extern int ipc_forward(call_t *call, phone_t *newphone, answerbox_t *oldbox,
    297     int mode);
     296extern int ipc_forward(call_t *, phone_t *, answerbox_t *, int);
    298297extern void ipc_cleanup(void);
    299 extern int ipc_phone_hangup(phone_t *phone);
    300 extern void ipc_backsend_err(phone_t *phone, call_t *call, unative_t err);
    301 extern void ipc_print_task(task_id_t taskid);
     298extern int ipc_phone_hangup(phone_t *);
     299extern void ipc_backsend_err(phone_t *, call_t *, unative_t);
     300extern void ipc_print_task(task_id_t);
    302301
    303302extern answerbox_t *ipc_phone_0;
  • kernel/generic/src/ipc/ipc.c

    r776f2e6 r12ab886  
    118118 *
    119119 * @param box           Answerbox structure to be initialized.
    120  */
    121 void ipc_answerbox_init(answerbox_t *box)
     120 * @param task          Task to which the answerbox belongs.
     121 */
     122void ipc_answerbox_init(answerbox_t *box, task_t *task)
    122123{
    123124        spinlock_initialize(&box->lock, "ipc_box_lock");
     
    130131        list_initialize(&box->irq_notifs);
    131132        list_initialize(&box->irq_head);
    132         box->task = TASK;
     133        box->task = task;
    133134}
    134135
     
    173174        answerbox_t sync_box;
    174175
    175         ipc_answerbox_init(&sync_box);
     176        ipc_answerbox_init(&sync_box, TASK);
    176177
    177178        /* We will receive data in a special box. */
  • kernel/generic/src/proc/task.c

    r776f2e6 r12ab886  
    172172        ta->cycles = 0;
    173173       
    174         ipc_answerbox_init(&ta->answerbox);
     174        ipc_answerbox_init(&ta->answerbox, ta);
    175175        for (i = 0; i < IPC_MAX_PHONES; i++)
    176176                ipc_phone_init(&ta->phones[i]);
Note: See TracChangeset for help on using the changeset viewer.