Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/ipc/ipcrsc.c

    r239acce r55b77d9  
    132132#include <ipc/ipcrsc.h>
    133133#include <debug.h>
    134 #include <abi/errno.h>
    135134
    136135/** Find call_t * in call table according to callid.
     
    152151       
    153152        list_foreach(TASK->answerbox.dispatched_calls, lst) {
    154                 call_t *call = list_get_instance(lst, call_t, ab_link);
     153                call_t *call = list_get_instance(lst, call_t, link);
    155154                if ((sysarg_t) call == callid) {
    156155                        result = call;
     
    163162}
    164163
    165 /** Get phone from the current task by ID.
    166  *
    167  * @param phoneid Phone ID.
    168  * @param phone   Place to store pointer to phone.
    169  *
    170  * @return EOK on success, EINVAL if ID is invalid.
    171  *
    172  */
    173 int phone_get(sysarg_t phoneid, phone_t **phone)
    174 {
    175         if (phoneid >= IPC_MAX_PHONES)
    176                 return EINVAL;
    177        
    178         *phone = &TASK->phones[phoneid];
    179         return EOK;
    180 }
    181 
    182164/** Allocate new phone slot in the specified task.
    183165 *
     
    194176        size_t i;
    195177        for (i = 0; i < IPC_MAX_PHONES; i++) {
    196                 phone_t *phone = &task->phones[i];
    197 
    198                 if ((phone->state == IPC_PHONE_HUNGUP) &&
    199                     (atomic_get(&phone->active_calls) == 0))
    200                         phone->state = IPC_PHONE_FREE;
     178                if ((task->phones[i].state == IPC_PHONE_HUNGUP) &&
     179                    (atomic_get(&task->phones[i].active_calls) == 0))
     180                        task->phones[i].state = IPC_PHONE_FREE;
    201181               
    202                 if (phone->state == IPC_PHONE_FREE) {
    203                         phone->state = IPC_PHONE_CONNECTING;
     182                if (task->phones[i].state == IPC_PHONE_FREE) {
     183                        task->phones[i].state = IPC_PHONE_CONNECTING;
    204184                        break;
    205185                }
     
    243223 * @param phoneid Phone handle to be connected.
    244224 * @param box     Answerbox to which to connect the phone handle.
    245  * @return        True if the phone was connected, false otherwise.
    246225 *
    247226 * The procedure _enforces_ that the user first marks the phone
     
    250229 *
    251230 */
    252 bool phone_connect(int phoneid, answerbox_t *box)
     231void phone_connect(int phoneid, answerbox_t *box)
    253232{
    254233        phone_t *phone = &TASK->phones[phoneid];
    255234       
    256235        ASSERT(phone->state == IPC_PHONE_CONNECTING);
    257         return ipc_phone_connect(phone, box);
     236        ipc_phone_connect(phone, box);
    258237}
    259238
Note: See TracChangeset for help on using the changeset viewer.