Changeset d8f7362 in mainline


Ignore:
Timestamp:
2006-06-05T22:19:02Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c74804f
Parents:
b65caba1
Message:

Small updates to ipc.

Location:
generic
Files:
4 edited

Legend:

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

    rb65caba1 rd8f7362  
    226226extern int ipc_forward(call_t *call, phone_t *newphone, answerbox_t *oldbox);
    227227void ipc_cleanup(void);
    228 extern int ipc_phone_hangup(phone_t *phone, int aggressive);
     228int ipc_phone_hangup(phone_t *phone);
    229229extern void ipc_backsend_err(phone_t *phone, call_t *call, __native err);
    230230extern void ipc_print_task(task_id_t taskid);
  • generic/src/ipc/ipc.c

    rb65caba1 rd8f7362  
    238238 *
    239239 * @param phone Phone to be hung up
    240  * @param aggressive If false, the phone is only marked hungup, and all
    241  *              messages are allowed to complete.
    242  *              If true, all messages in all queues are discarded. There
    243  *              may still be some messages that will be 'in-transit' on
    244  *              other CPU.
    245240 *             
    246241 * @return 0 - phone disconnected, -1 - the phone was already disconnected
    247242 */
    248 int ipc_phone_hangup(phone_t *phone, int aggressive)
     243int ipc_phone_hangup(phone_t *phone)
    249244{
    250245        answerbox_t *box;
     
    270265                        _ipc_call(phone, box, call);
    271266                }
    272         }
    273 
    274         if (aggressive && atomic_get(&phone->active_calls) > 0) {
    275                 /* TODO: Do some stuff be VERY aggressive */
    276267        }
    277268
     
    383374        /* Disconnect all our phones ('ipc_phone_hangup') */
    384375        for (i=0;i < IPC_MAX_PHONES; i++)
    385                 ipc_phone_hangup(&TASK->phones[i], 1);
     376                ipc_phone_hangup(&TASK->phones[i]);
    386377
    387378        /* Disconnect all connected irqs */
     
    422413                                TASK->phones[i].state = IPC_PHONE_FREE;
    423414                       
     415                        /* Just for sure, we might have had some
     416                         * IPC_PHONE_CONNECTING phones */
    424417                        if (TASK->phones[i].state == IPC_PHONE_CONNECTED)
    425                                 ipc_phone_hangup(&TASK->phones[i], 1);
     418                                ipc_phone_hangup(&TASK->phones[i]);
     419                        /* If the hangup succeeded, it has sent a HANGUP
     420                         * message, the IPC is now in HUNGUP state, we
     421                         * wait for the reply to come */
    426422                       
    427423                        if (TASK->phones[i].state != IPC_PHONE_FREE)
  • generic/src/ipc/irq.c

    rb65caba1 rd8f7362  
    216216        if (irq_conns[irq].box) {
    217217                call = ipc_call_alloc(FRAME_ATOMIC);
     218                if (!call) {
     219                        spinlock_unlock(&irq_conns[irq].lock);
     220                        return;
     221                }
    218222                call->flags |= IPC_CALL_NOTIF;
    219223                IPC_SET_METHOD(call->data, IPC_M_INTERRUPT);
  • generic/src/ipc/sysipc.c

    rb65caba1 rd8f7362  
    493493        GET_CHECK_PHONE(phone, phoneid, return ENOENT);
    494494
    495         if (ipc_phone_hangup(phone, 0))
     495        if (ipc_phone_hangup(phone))
    496496                return -1;
    497497
Note: See TracChangeset for help on using the changeset viewer.