Changes in / [0851a3d:ac307b2] in mainline


Ignore:
Files:
1 added
13 edited

Legend:

Unmodified
Added
Removed
  • abi/include/abi/ipc/methods.h

    r0851a3d rac307b2  
    3636#define ABI_IPC_METHODS_H_
    3737
     38#include <abi/cap.h>
     39
    3840/* Well known phone descriptors */
    39 #define PHONE_NS  0
     41#define PHONE_NS  (CAP_NIL + 1)
    4042
    4143/** Kernel IPC interfaces
  • kernel/generic/include/cap/cap.h

    r0851a3d rac307b2  
    5353
    5454typedef enum {
     55        KOBJECT_TYPE_CALL,
     56        KOBJECT_TYPE_IRQ,
    5557        KOBJECT_TYPE_PHONE,
    56         KOBJECT_TYPE_IRQ,
    5758        KOBJECT_TYPE_MAX
    5859} kobject_type_t;
    5960
    6061struct task;
     62
     63struct call;
     64struct irq;
    6165struct phone;
    62 struct irq;
    6366
    6467struct kobject;
     
    7982        union {
    8083                void *raw;
     84                struct call *call;
     85                struct irq *irq;
    8186                struct phone *phone;
    82                 struct irq *irq;
    8387        };
    8488} kobject_t;
  • kernel/generic/include/ipc/ipc.h

    r0851a3d rac307b2  
    106106        /** Phone which made or last masqueraded this call. */
    107107        phone_t *phone;
     108        /** Flags */
     109        unsigned flags;
     110        /** User-defined label */
     111        sysarg_t label;
    108112} ipc_data_t;
    109113
    110114typedef struct {
     115        kobject_t *kobject;
     116
    111117        /**
    112118         * Task link.
     
    115121         */
    116122        link_t ta_link;
    117 
    118         atomic_t refcnt;
    119123
    120124        /** Answerbox link. */
  • kernel/generic/include/ipc/sysipc.h

    r0851a3d rac307b2  
    4444extern sysarg_t sys_ipc_call_async_fast(sysarg_t, sysarg_t, sysarg_t,
    4545    sysarg_t, sysarg_t, sysarg_t);
    46 extern sysarg_t sys_ipc_call_async_slow(sysarg_t, ipc_data_t *);
     46extern sysarg_t sys_ipc_call_async_slow(sysarg_t, ipc_data_t *, sysarg_t);
    4747extern sysarg_t sys_ipc_answer_fast(sysarg_t, sysarg_t, sysarg_t, sysarg_t,
    4848    sysarg_t, sysarg_t);
  • kernel/generic/src/cap/cap.c

    r0851a3d rac307b2  
    7373
    7474#include <cap/cap.h>
     75#include <abi/cap.h>
    7576#include <proc/task.h>
    7677#include <synch/mutex.h>
     
    8182#include <stdint.h>
    8283
    83 #define MAX_CAPS        INT_MAX
     84#define CAPS_START      (CAP_NIL + 1)
     85#define CAPS_SIZE       (INT_MAX - CAPS_START)
     86#define CAPS_LAST       (CAPS_SIZE - 1)
    8487
    8588static slab_cache_t *cap_slab;
     
    129132        if (!task->cap_info->handles)
    130133                goto error_handles;
    131         if (!ra_span_add(task->cap_info->handles, 0, MAX_CAPS))
     134        if (!ra_span_add(task->cap_info->handles, CAPS_START, CAPS_SIZE))
    132135                goto error_span;
    133136        if (!hash_table_create(&task->cap_info->caps, 0, 0, &caps_ops))
     
    220223        assert(mutex_locked(&task->cap_info->lock));
    221224
    222         if ((handle < 0) || (handle >= MAX_CAPS))
     225        if ((handle < CAPS_START) || (handle > CAPS_LAST))
    223226                return NULL;
    224227        ht_link_t *link = hash_table_find(&task->cap_info->caps, &handle);
     
    357360void cap_free(task_t *task, cap_handle_t handle)
    358361{
    359         assert(handle >= 0);
    360         assert(handle < MAX_CAPS);
     362        assert(handle >= CAPS_START);
     363        assert(handle <= CAPS_LAST);
    361364
    362365        mutex_lock(&task->cap_info->lock);
  • kernel/generic/src/ipc/ipc.c

    r0851a3d rac307b2  
    8787}
    8888
    89 void ipc_call_hold(call_t *call)
    90 {
    91         atomic_inc(&call->refcnt);
    92 }
    93 
    94 void ipc_call_release(call_t *call)
    95 {
    96         if (atomic_predec(&call->refcnt) == 0) {
    97                 if (call->buffer)
    98                         free(call->buffer);
    99                 if (call->caller_phone)
    100                         kobject_put(call->caller_phone->kobject);
    101                 slab_free(call_slab, call);
    102         }
    103 }
     89static void call_destroy(void *arg)
     90{
     91        call_t *call = (call_t *) arg;
     92
     93        if (call->buffer)
     94                free(call->buffer);
     95        if (call->caller_phone)
     96                kobject_put(call->caller_phone->kobject);
     97        slab_free(call_slab, call);
     98}
     99
     100static kobject_ops_t call_kobject_ops = {
     101        .destroy = call_destroy
     102};
    104103
    105104/** Allocate and initialize a call structure.
     
    117116{
    118117        call_t *call = slab_alloc(call_slab, flags);
    119         if (call) {
    120                 _ipc_call_init(call);
    121                 ipc_call_hold(call);
    122         }
     118        if (!call)
     119                return NULL;
     120        kobject_t *kobj = (kobject_t *) malloc(sizeof(kobject_t), flags);
     121        if (!kobj) {
     122                slab_free(call_slab, call);
     123                return NULL;
     124        }
     125
     126        _ipc_call_init(call);
     127        kobject_initialize(kobj, KOBJECT_TYPE_CALL, call, &call_kobject_ops);
     128        call->kobject = kobj;
    123129       
    124130        return call;
    125 }
    126 
    127 /** Deallocate a call structure.
    128  *
    129  * @param call Call structure to be freed.
    130  *
    131  */
    132 void ipc_call_free(call_t *call)
    133 {
    134         ipc_call_release(call);
    135131}
    136132
     
    290286                /* This is a forgotten call and call->sender is not valid. */
    291287                spinlock_unlock(&call->forget_lock);
    292                 ipc_call_free(call);
     288                kobject_put(call->kobject);
    293289                return;
    294290        } else {
     
    705701         * must hold a reference to it.
    706702         */
    707         ipc_call_hold(call);
     703        kobject_add_ref(call->kobject);
    708704
    709705        spinlock_unlock(&call->forget_lock);
     
    714710        SYSIPC_OP(request_forget, call);
    715711
    716         ipc_call_release(call);
     712        kobject_put(call->kobject);
    717713}
    718714
     
    822818        SYSIPC_OP(answer_process, call);
    823819
    824         ipc_call_free(call);
     820        kobject_put(call->kobject);
    825821        goto restart;
    826822}
  • kernel/generic/src/ipc/sysipc.c

    r0851a3d rac307b2  
    286286#endif
    287287
    288                 ipc_call_hold(call);
     288                kobject_add_ref(call->kobject);
    289289                rc = ipc_call_sync(kobj->phone, call);
    290290                spinlock_lock(&call->forget_lock);
    291291                bool forgotten = call->forget;
    292292                spinlock_unlock(&call->forget_lock);
    293                 ipc_call_release(call);
     293                kobject_put(call->kobject);
    294294
    295295#ifdef CONFIG_UDEBUG
     
    306306                                 * deallocation.
    307307                                 */
    308                                 ipc_call_free(call);
     308                                kobject_put(call->kobject);
    309309                        } else {
    310310                                /*
     
    323323       
    324324        memcpy(data->args, call->data.args, sizeof(data->args));
    325         ipc_call_free(call);
     325        kobject_put(call->kobject);
    326326        kobject_put(kobj);
    327327       
     
    347347/** Make a fast asynchronous call over IPC.
    348348 *
    349  * This function can only handle four arguments of payload, but is faster than
     349 * This function can only handle three arguments of payload, but is faster than
    350350 * the generic function sys_ipc_call_async_slow().
    351351 *
     
    355355 * @param arg2     Service-defined payload argument.
    356356 * @param arg3     Service-defined payload argument.
    357  * @param arg4     Service-defined payload argument.
     357 * @param label    User-defined label.
    358358 *
    359359 * @return Call hash on success.
     
    362362 */
    363363sysarg_t sys_ipc_call_async_fast(sysarg_t handle, sysarg_t imethod,
    364     sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4)
     364    sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t label)
    365365{
    366366        kobject_t *kobj = kobject_get(TASK, handle, KOBJECT_TYPE_PHONE);
     
    378378        IPC_SET_ARG2(call->data, arg2);
    379379        IPC_SET_ARG3(call->data, arg3);
    380         IPC_SET_ARG4(call->data, arg4);
    381380       
    382381        /*
     
    385384         */
    386385        IPC_SET_ARG5(call->data, 0);
     386
     387        /* Set the user-defined label */
     388        call->data.label = label;
    387389       
    388390        int res = request_preprocess(call, kobj->phone);
     
    401403 * @param handle  Phone capability for the call.
    402404 * @param data    Userspace address of call data with the request.
     405 * @param label   User-defined label.
    403406 *
    404407 * @return See sys_ipc_call_async_fast().
    405408 *
    406409 */
    407 sysarg_t sys_ipc_call_async_slow(sysarg_t handle, ipc_data_t *data)
     410sysarg_t sys_ipc_call_async_slow(sysarg_t handle, ipc_data_t *data,
     411    sysarg_t label)
    408412{
    409413        kobject_t *kobj = kobject_get(TASK, handle, KOBJECT_TYPE_PHONE);
     
    420424            sizeof(call->data.args));
    421425        if (rc != 0) {
    422                 ipc_call_free(call);
     426                kobject_put(call->kobject);
    423427                kobject_put(kobj);
    424428                return (sysarg_t) rc;
    425429        }
     430
     431        /* Set the user-defined label */
     432        call->data.label = label;
    426433       
    427434        int res = request_preprocess(call, kobj->phone);
     
    721728 *
    722729 * @return Hash of the call.
    723  *         If IPC_CALLID_NOTIFICATION bit is set in the hash, the
    724  *         call is a notification. IPC_CALLID_ANSWERED denotes an
    725  *         answer.
    726  *
    727730 */
    728731sysarg_t sys_ipc_wait_for_call(ipc_data_t *calldata, uint32_t usec,
     
    751754                call->data.phone = (void *) call->priv;
    752755               
     756                call->data.flags = IPC_CALLID_NOTIFICATION;
     757
    753758                STRUCT_TO_USPACE(calldata, &call->data);
     759                kobject_put(call->kobject);
    754760               
    755                 ipc_call_free(call);
    756                
    757                 return ((sysarg_t) call) | IPC_CALLID_NOTIFICATION;
     761                return (sysarg_t) call;
    758762        }
    759763       
     
    762766               
    763767                if (call->flags & IPC_CALL_DISCARD_ANSWER) {
    764                         ipc_call_free(call);
     768                        kobject_put(call->kobject);
    765769                        goto restart;
    766770                }
     771
     772                call->data.flags = IPC_CALLID_ANSWERED;
    767773               
    768774                STRUCT_TO_USPACE(calldata, &call->data);
    769                 ipc_call_free(call);
     775                kobject_put(call->kobject);
    770776               
    771                 return ((sysarg_t) call) | IPC_CALLID_ANSWERED;
     777                return (sysarg_t) call;
    772778        }
    773779       
  • uspace/app/trace/ipcp.c

    r0851a3d rac307b2  
    323323        pending_call_t *pcall;
    324324       
    325         if ((hash & IPC_CALLID_ANSWERED) == 0 && hash != IPCP_CALLID_SYNC) {
     325        if ((call->flags & IPC_CALLID_ANSWERED) == 0 &&
     326            hash != IPCP_CALLID_SYNC) {
    326327                /* Not a response */
    327328                if ((display_mask & DM_IPC) != 0) {
     
    331332        }
    332333       
    333         hash = hash & ~IPC_CALLID_ANSWERED;
    334        
    335334        item = hash_table_find(&pending_calls, &hash);
    336335        if (item == NULL)
  • uspace/app/trace/syscalls.c

    r0851a3d rac307b2  
    5454
    5555    [SYS_IPC_CALL_ASYNC_FAST] = { "ipc_call_async_fast", 6,     V_HASH },
    56     [SYS_IPC_CALL_ASYNC_SLOW] = { "ipc_call_async_slow", 2,     V_HASH },
     56    [SYS_IPC_CALL_ASYNC_SLOW] = { "ipc_call_async_slow", 3,     V_HASH },
    5757
    5858    [SYS_IPC_ANSWER_FAST] = { "ipc_answer_fast",        6,      V_ERRNO },
  • uspace/lib/c/generic/async.c

    r0851a3d rac307b2  
    13411341       
    13421342        /* Kernel notification */
    1343         if ((callid & IPC_CALLID_NOTIFICATION)) {
     1343        if (call->flags & IPC_CALLID_NOTIFICATION) {
    13441344                fibril_t *fibril = (fibril_t *) __tcb_get()->fibril_data;
    13451345                unsigned oldsw = fibril->switches;
     
    14951495                }
    14961496               
    1497                 if (callid & IPC_CALLID_ANSWERED)
     1497                if (call.flags & IPC_CALLID_ANSWERED)
    14981498                        continue;
    14991499               
  • uspace/lib/c/generic/ipc.c

    r0851a3d rac307b2  
    11/*
    22 * Copyright (c) 2006 Ondrej Palkovsky
     3 * Copyright (c) 2017 Jakub Jermar
    34 * All rights reserved.
    45 *
     
    5051
    5152/**
    52  * Structures of this type are used for keeping track
    53  * of sent asynchronous calls and queing unsent calls.
    54  */
    55 typedef struct {
    56         link_t list;
    57        
     53 * Structures of this type are used for keeping track of sent asynchronous calls.
     54 */
     55typedef struct async_call {
    5856        ipc_async_callback_t callback;
    5957        void *private;
    6058       
    61         union {
    62                 ipc_callid_t callid;
    63                 struct {
    64                         ipc_call_t data;
    65                         int phoneid;
    66                 } msg;
    67         } u;
    68        
    69         /** Fibril waiting for sending this call. */
    70         fid_t fid;
     59        struct {
     60                ipc_call_t data;
     61                int phoneid;
     62        } msg;
    7163} async_call_t;
    72 
    73 LIST_INITIALIZE(dispatched_calls);
    74 
    75 /** List of asynchronous calls that were not accepted by kernel.
    76  *
    77  * Protected by async_futex, because if the call is not accepted
    78  * by the kernel, the async framework is used automatically.
    79  *
    80  */
    81 LIST_INITIALIZE(queued_calls);
    82 
    83 static futex_t ipc_futex = FUTEX_INITIALIZER;
    84 
    85 /** Send asynchronous message via syscall.
    86  *
    87  * @param phoneid Phone handle for the call.
    88  * @param data    Call data with the request.
    89  *
    90  * @return Hash of the call or an error code.
    91  *
    92  */
    93 static ipc_callid_t ipc_call_async_internal(int phoneid, ipc_call_t *data)
    94 {
    95         return __SYSCALL2(SYS_IPC_CALL_ASYNC_SLOW, phoneid, (sysarg_t) data);
    96 }
    9764
    9865/** Prologue for ipc_call_async_*() functions.
     
    133100        if (!call) {
    134101                /* Nothing to do regardless if failed or not */
    135                 futex_unlock(&ipc_futex);
    136102                return;
    137103        }
    138104       
    139105        if (callid == (ipc_callid_t) IPC_CALLRET_FATAL) {
    140                 futex_unlock(&ipc_futex);
    141                
    142106                /* Call asynchronous handler with error code */
    143107                if (call->callback)
     
    147111                return;
    148112        }
    149        
    150         call->u.callid = callid;
    151        
    152         /* Add call to the list of dispatched calls */
    153         list_append(&call->list, &dispatched_calls);
    154         futex_unlock(&ipc_futex);
    155113}
    156114
    157115/** Fast asynchronous call.
    158116 *
    159  * This function can only handle four arguments of payload. It is, however,
     117 * This function can only handle three arguments of payload. It is, however,
    160118 * faster than the more generic ipc_call_async_slow().
    161119 *
     
    171129 * @param arg2        Service-defined payload argument.
    172130 * @param arg3        Service-defined payload argument.
    173  * @param arg4        Service-defined payload argument.
    174131 * @param private     Argument to be passed to the answer/error callback.
    175132 * @param callback    Answer or error callback.
    176133 */
    177134void ipc_call_async_fast(int phoneid, sysarg_t imethod, sysarg_t arg1,
    178     sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, void *private,
    179     ipc_async_callback_t callback)
    180 {
    181         async_call_t *call = NULL;
    182        
    183         if (callback) {
    184                 call = ipc_prepare_async(private, callback);
    185                 if (!call)
    186                         return;
    187         }
    188        
    189         /*
    190          * We need to make sure that we get callid
    191          * before another thread accesses the queue again.
    192          */
    193        
    194         futex_lock(&ipc_futex);
     135    sysarg_t arg2, sysarg_t arg3, void *private, ipc_async_callback_t callback)
     136{
     137        async_call_t *call = ipc_prepare_async(private, callback);
     138        if (!call)
     139                return;
     140       
    195141        ipc_callid_t callid = __SYSCALL6(SYS_IPC_CALL_ASYNC_FAST, phoneid,
    196             imethod, arg1, arg2, arg3, arg4);
     142            imethod, arg1, arg2, arg3, (sysarg_t) call);
    197143       
    198144        ipc_finish_async(callid, phoneid, call);
     
    225171                return;
    226172       
    227         IPC_SET_IMETHOD(call->u.msg.data, imethod);
    228         IPC_SET_ARG1(call->u.msg.data, arg1);
    229         IPC_SET_ARG2(call->u.msg.data, arg2);
    230         IPC_SET_ARG3(call->u.msg.data, arg3);
    231         IPC_SET_ARG4(call->u.msg.data, arg4);
    232         IPC_SET_ARG5(call->u.msg.data, arg5);
    233        
    234         /*
    235          * We need to make sure that we get callid
    236          * before another threadaccesses the queue again.
    237          */
    238        
    239         futex_lock(&ipc_futex);
    240         ipc_callid_t callid =
    241             ipc_call_async_internal(phoneid, &call->u.msg.data);
     173        IPC_SET_IMETHOD(call->msg.data, imethod);
     174        IPC_SET_ARG1(call->msg.data, arg1);
     175        IPC_SET_ARG2(call->msg.data, arg2);
     176        IPC_SET_ARG3(call->msg.data, arg3);
     177        IPC_SET_ARG4(call->msg.data, arg4);
     178        IPC_SET_ARG5(call->msg.data, arg5);
     179       
     180        ipc_callid_t callid = __SYSCALL3(SYS_IPC_CALL_ASYNC_SLOW, phoneid,
     181            (sysarg_t) &call->msg.data, (sysarg_t) call);
    242182       
    243183        ipc_finish_async(callid, phoneid, call);
     
    296236}
    297237
    298 /** Try to dispatch queued calls from the async queue.
    299  *
    300  */
    301 static void dispatch_queued_calls(void)
    302 {
    303         /** @todo
    304          * Integrate intelligently ipc_futex so that it is locked during
    305          * ipc_call_async_*() until it is added to dispatched_calls.
    306          */
    307        
    308         futex_down(&async_futex);
    309        
    310         while (!list_empty(&queued_calls)) {
    311                 async_call_t *call =
    312                     list_get_instance(list_first(&queued_calls), async_call_t, list);
    313                 ipc_callid_t callid =
    314                     ipc_call_async_internal(call->u.msg.phoneid, &call->u.msg.data);
    315                
    316                 list_remove(&call->list);
    317                
    318                 futex_up(&async_futex);
    319                
    320                 assert(call->fid);
    321                 fibril_add_ready(call->fid);
    322                
    323                 if (callid == (ipc_callid_t) IPC_CALLRET_FATAL) {
    324                         if (call->callback)
    325                                 call->callback(call->private, ENOENT, NULL);
    326                        
    327                         free(call);
    328                 } else {
    329                         call->u.callid = callid;
    330                        
    331                         futex_lock(&ipc_futex);
    332                         list_append(&call->list, &dispatched_calls);
    333                         futex_unlock(&ipc_futex);
    334                 }
    335                
    336                 futex_down(&async_futex);
    337         }
    338        
    339         futex_up(&async_futex);
    340 }
    341 
    342238/** Handle received answer.
    343  *
    344  * Find the hash of the answer and call the answer callback.
    345  *
    346  * The answer has the same hash as the request OR'ed with
    347  * the IPC_CALLID_ANSWERED bit.
    348  *
    349  * @todo Use hash table.
    350239 *
    351240 * @param callid Hash of the received answer.
    352241 * @param data   Call data of the answer.
    353  *
    354242 */
    355243static void handle_answer(ipc_callid_t callid, ipc_call_t *data)
    356244{
    357         callid &= ~IPC_CALLID_ANSWERED;
    358        
    359         futex_lock(&ipc_futex);
    360        
    361         link_t *item;
    362         for (item = dispatched_calls.head.next; item != &dispatched_calls.head;
    363             item = item->next) {
    364                 async_call_t *call =
    365                     list_get_instance(item, async_call_t, list);
    366                
    367                 if (call->u.callid == callid) {
    368                         list_remove(&call->list);
    369                        
    370                         futex_unlock(&ipc_futex);
    371                        
    372                         if (call->callback)
    373                                 call->callback(call->private,
    374                                     IPC_GET_RETVAL(*data), data);
    375                        
    376                         free(call);
    377                         return;
    378                 }
    379         }
    380        
    381         futex_unlock(&ipc_futex);
     245        async_call_t *call = data->label;
     246
     247        if (!call)
     248                return;
     249
     250        if (call->callback)
     251                call->callback(call->private, IPC_GET_RETVAL(*data), data);
     252        free(call);
    382253}
    383254
     
    388259 * @param flags Flags passed to SYS_IPC_WAIT (blocking, nonblocking).
    389260 *
    390  * @return Hash of the call. Note that certain bits have special
    391  *         meaning: IPC_CALLID_ANSWERED is set in an answer
    392  *         and IPC_CALLID_NOTIFICATION is used for notifications.
    393  *
     261 * @return Hash of the call.
    394262 */
    395263ipc_callid_t ipc_wait_cycle(ipc_call_t *call, sysarg_t usec,
     
    400268       
    401269        /* Handle received answers */
    402         if (callid & IPC_CALLID_ANSWERED) {
     270        if (callid && (call->flags & IPC_CALLID_ANSWERED))
    403271                handle_answer(callid, call);
    404                 dispatch_queued_calls();
    405         }
    406272       
    407273        return callid;
     
    432298        do {
    433299                callid = ipc_wait_cycle(call, usec, SYNCH_FLAGS_NONE);
    434         } while (callid & IPC_CALLID_ANSWERED);
     300        } while (callid && (call->flags & IPC_CALLID_ANSWERED));
    435301       
    436302        return callid;
     
    453319                callid = ipc_wait_cycle(call, SYNCH_NO_TIMEOUT,
    454320                    SYNCH_FLAGS_NON_BLOCKING);
    455         } while (callid & IPC_CALLID_ANSWERED);
     321        } while (callid && (call->flags & IPC_CALLID_ANSWERED));
    456322       
    457323        return callid;
  • uspace/lib/c/include/ipc/common.h

    r0851a3d rac307b2  
    4343#define IPC_FLAG_BLOCKING  0x01
    4444
     45struct async_call;
     46
    4547typedef struct {
    4648        sysarg_t args[IPC_CALL_LEN];
    4749        task_id_t in_task_id;
    4850        sysarg_t in_phone_hash;
     51        unsigned flags;
     52        struct async_call *label;
    4953} ipc_call_t;
    5054
  • uspace/lib/c/include/ipc/ipc.h

    r0851a3d rac307b2  
    8989
    9090#define ipc_call_async_0(phoneid, method, private, callback) \
    91         ipc_call_async_fast((phoneid), (method), 0, 0, 0, 0, (private), \
    92             (callback))
     91        ipc_call_async_fast((phoneid), (method), 0, 0, 0, (private), (callback))
    9392#define ipc_call_async_1(phoneid, method, arg1, private, callback) \
    94         ipc_call_async_fast((phoneid), (method), (arg1), 0, 0, 0, (private), \
     93        ipc_call_async_fast((phoneid), (method), (arg1), 0, 0, (private), \
    9594            (callback))
    9695#define ipc_call_async_2(phoneid, method, arg1, arg2, private, callback) \
    97         ipc_call_async_fast((phoneid), (method), (arg1), (arg2), 0, 0, \
     96        ipc_call_async_fast((phoneid), (method), (arg1), (arg2), 0, \
    9897            (private), (callback))
    9998#define ipc_call_async_3(phoneid, method, arg1, arg2, arg3, private, callback) \
    100         ipc_call_async_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, \
     99        ipc_call_async_fast((phoneid), (method), (arg1), (arg2), (arg3), \
    101100            (private), (callback))
    102101#define ipc_call_async_4(phoneid, method, arg1, arg2, arg3, arg4, private, \
    103102    callback) \
    104         ipc_call_async_fast((phoneid), (method), (arg1), (arg2), (arg3), \
    105             (arg4), (private), (callback))
     103        ipc_call_async_slow((phoneid), (method), (arg1), (arg2), (arg3), \
     104            (arg4), 0, (private), (callback))
    106105#define ipc_call_async_5(phoneid, method, arg1, arg2, arg3, arg4, arg5, \
    107106    private, callback) \
     
    110109
    111110extern void ipc_call_async_fast(int, sysarg_t, sysarg_t, sysarg_t, sysarg_t,
    112     sysarg_t, void *, ipc_async_callback_t);
     111    void *, ipc_async_callback_t);
    113112extern void ipc_call_async_slow(int, sysarg_t, sysarg_t, sysarg_t, sysarg_t,
    114113    sysarg_t, sysarg_t, void *, ipc_async_callback_t);
Note: See TracChangeset for help on using the changeset viewer.