Changes in / [ac307b2:0851a3d] in mainline


Ignore:
Files:
1 deleted
13 edited

Legend:

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

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

    rac307b2 r0851a3d  
    5353
    5454typedef enum {
    55         KOBJECT_TYPE_CALL,
     55        KOBJECT_TYPE_PHONE,
    5656        KOBJECT_TYPE_IRQ,
    57         KOBJECT_TYPE_PHONE,
    5857        KOBJECT_TYPE_MAX
    5958} kobject_type_t;
    6059
    6160struct task;
    62 
    63 struct call;
     61struct phone;
    6462struct irq;
    65 struct phone;
    6663
    6764struct kobject;
     
    8279        union {
    8380                void *raw;
    84                 struct call *call;
     81                struct phone *phone;
    8582                struct irq *irq;
    86                 struct phone *phone;
    8783        };
    8884} kobject_t;
  • kernel/generic/include/ipc/ipc.h

    rac307b2 r0851a3d  
    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;
    112108} ipc_data_t;
    113109
    114110typedef struct {
    115         kobject_t *kobject;
    116 
    117111        /**
    118112         * Task link.
     
    121115         */
    122116        link_t ta_link;
     117
     118        atomic_t refcnt;
    123119
    124120        /** Answerbox link. */
  • kernel/generic/include/ipc/sysipc.h

    rac307b2 r0851a3d  
    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 *, sysarg_t);
     46extern sysarg_t sys_ipc_call_async_slow(sysarg_t, ipc_data_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

    rac307b2 r0851a3d  
    7373
    7474#include <cap/cap.h>
    75 #include <abi/cap.h>
    7675#include <proc/task.h>
    7776#include <synch/mutex.h>
     
    8281#include <stdint.h>
    8382
    84 #define CAPS_START      (CAP_NIL + 1)
    85 #define CAPS_SIZE       (INT_MAX - CAPS_START)
    86 #define CAPS_LAST       (CAPS_SIZE - 1)
     83#define MAX_CAPS        INT_MAX
    8784
    8885static slab_cache_t *cap_slab;
     
    132129        if (!task->cap_info->handles)
    133130                goto error_handles;
    134         if (!ra_span_add(task->cap_info->handles, CAPS_START, CAPS_SIZE))
     131        if (!ra_span_add(task->cap_info->handles, 0, MAX_CAPS))
    135132                goto error_span;
    136133        if (!hash_table_create(&task->cap_info->caps, 0, 0, &caps_ops))
     
    223220        assert(mutex_locked(&task->cap_info->lock));
    224221
    225         if ((handle < CAPS_START) || (handle > CAPS_LAST))
     222        if ((handle < 0) || (handle >= MAX_CAPS))
    226223                return NULL;
    227224        ht_link_t *link = hash_table_find(&task->cap_info->caps, &handle);
     
    360357void cap_free(task_t *task, cap_handle_t handle)
    361358{
    362         assert(handle >= CAPS_START);
    363         assert(handle <= CAPS_LAST);
     359        assert(handle >= 0);
     360        assert(handle < MAX_CAPS);
    364361
    365362        mutex_lock(&task->cap_info->lock);
  • kernel/generic/src/ipc/ipc.c

    rac307b2 r0851a3d  
    8787}
    8888
    89 static 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 
    100 static kobject_ops_t call_kobject_ops = {
    101         .destroy = call_destroy
    102 };
     89void ipc_call_hold(call_t *call)
     90{
     91        atomic_inc(&call->refcnt);
     92}
     93
     94void 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}
    103104
    104105/** Allocate and initialize a call structure.
     
    116117{
    117118        call_t *call = slab_alloc(call_slab, flags);
    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;
     119        if (call) {
     120                _ipc_call_init(call);
     121                ipc_call_hold(call);
     122        }
    129123       
    130124        return call;
     125}
     126
     127/** Deallocate a call structure.
     128 *
     129 * @param call Call structure to be freed.
     130 *
     131 */
     132void ipc_call_free(call_t *call)
     133{
     134        ipc_call_release(call);
    131135}
    132136
     
    286290                /* This is a forgotten call and call->sender is not valid. */
    287291                spinlock_unlock(&call->forget_lock);
    288                 kobject_put(call->kobject);
     292                ipc_call_free(call);
    289293                return;
    290294        } else {
     
    701705         * must hold a reference to it.
    702706         */
    703         kobject_add_ref(call->kobject);
     707        ipc_call_hold(call);
    704708
    705709        spinlock_unlock(&call->forget_lock);
     
    710714        SYSIPC_OP(request_forget, call);
    711715
    712         kobject_put(call->kobject);
     716        ipc_call_release(call);
    713717}
    714718
     
    818822        SYSIPC_OP(answer_process, call);
    819823
    820         kobject_put(call->kobject);
     824        ipc_call_free(call);
    821825        goto restart;
    822826}
  • kernel/generic/src/ipc/sysipc.c

    rac307b2 r0851a3d  
    286286#endif
    287287
    288                 kobject_add_ref(call->kobject);
     288                ipc_call_hold(call);
    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                 kobject_put(call->kobject);
     293                ipc_call_release(call);
    294294
    295295#ifdef CONFIG_UDEBUG
     
    306306                                 * deallocation.
    307307                                 */
    308                                 kobject_put(call->kobject);
     308                                ipc_call_free(call);
    309309                        } else {
    310310                                /*
     
    323323       
    324324        memcpy(data->args, call->data.args, sizeof(data->args));
    325         kobject_put(call->kobject);
     325        ipc_call_free(call);
    326326        kobject_put(kobj);
    327327       
     
    347347/** Make a fast asynchronous call over IPC.
    348348 *
    349  * This function can only handle three arguments of payload, but is faster than
     349 * This function can only handle four 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 label    User-defined label.
     357 * @param arg4     Service-defined payload argument.
    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 label)
     364    sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4)
    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);
    380381       
    381382        /*
     
    384385         */
    385386        IPC_SET_ARG5(call->data, 0);
    386 
    387         /* Set the user-defined label */
    388         call->data.label = label;
    389387       
    390388        int res = request_preprocess(call, kobj->phone);
     
    403401 * @param handle  Phone capability for the call.
    404402 * @param data    Userspace address of call data with the request.
    405  * @param label   User-defined label.
    406403 *
    407404 * @return See sys_ipc_call_async_fast().
    408405 *
    409406 */
    410 sysarg_t sys_ipc_call_async_slow(sysarg_t handle, ipc_data_t *data,
    411     sysarg_t label)
     407sysarg_t sys_ipc_call_async_slow(sysarg_t handle, ipc_data_t *data)
    412408{
    413409        kobject_t *kobj = kobject_get(TASK, handle, KOBJECT_TYPE_PHONE);
     
    424420            sizeof(call->data.args));
    425421        if (rc != 0) {
    426                 kobject_put(call->kobject);
     422                ipc_call_free(call);
    427423                kobject_put(kobj);
    428424                return (sysarg_t) rc;
    429425        }
    430 
    431         /* Set the user-defined label */
    432         call->data.label = label;
    433426       
    434427        int res = request_preprocess(call, kobj->phone);
     
    728721 *
    729722 * @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 *
    730727 */
    731728sysarg_t sys_ipc_wait_for_call(ipc_data_t *calldata, uint32_t usec,
     
    754751                call->data.phone = (void *) call->priv;
    755752               
    756                 call->data.flags = IPC_CALLID_NOTIFICATION;
    757 
    758753                STRUCT_TO_USPACE(calldata, &call->data);
    759                 kobject_put(call->kobject);
    760754               
    761                 return (sysarg_t) call;
     755                ipc_call_free(call);
     756               
     757                return ((sysarg_t) call) | IPC_CALLID_NOTIFICATION;
    762758        }
    763759       
     
    766762               
    767763                if (call->flags & IPC_CALL_DISCARD_ANSWER) {
    768                         kobject_put(call->kobject);
     764                        ipc_call_free(call);
    769765                        goto restart;
    770766                }
    771 
    772                 call->data.flags = IPC_CALLID_ANSWERED;
    773767               
    774768                STRUCT_TO_USPACE(calldata, &call->data);
    775                 kobject_put(call->kobject);
     769                ipc_call_free(call);
    776770               
    777                 return (sysarg_t) call;
     771                return ((sysarg_t) call) | IPC_CALLID_ANSWERED;
    778772        }
    779773       
  • uspace/app/trace/ipcp.c

    rac307b2 r0851a3d  
    323323        pending_call_t *pcall;
    324324       
    325         if ((call->flags & IPC_CALLID_ANSWERED) == 0 &&
    326             hash != IPCP_CALLID_SYNC) {
     325        if ((hash & IPC_CALLID_ANSWERED) == 0 && hash != IPCP_CALLID_SYNC) {
    327326                /* Not a response */
    328327                if ((display_mask & DM_IPC) != 0) {
     
    332331        }
    333332       
     333        hash = hash & ~IPC_CALLID_ANSWERED;
     334       
    334335        item = hash_table_find(&pending_calls, &hash);
    335336        if (item == NULL)
  • uspace/app/trace/syscalls.c

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

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

    rac307b2 r0851a3d  
    11/*
    22 * Copyright (c) 2006 Ondrej Palkovsky
    3  * Copyright (c) 2017 Jakub Jermar
    43 * All rights reserved.
    54 *
     
    5150
    5251/**
    53  * Structures of this type are used for keeping track of sent asynchronous calls.
    54  */
    55 typedef struct async_call {
     52 * Structures of this type are used for keeping track
     53 * of sent asynchronous calls and queing unsent calls.
     54 */
     55typedef struct {
     56        link_t list;
     57       
    5658        ipc_async_callback_t callback;
    5759        void *private;
    5860       
    59         struct {
    60                 ipc_call_t data;
    61                 int phoneid;
    62         } msg;
     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;
    6371} async_call_t;
     72
     73LIST_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 */
     81LIST_INITIALIZE(queued_calls);
     82
     83static 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 */
     93static 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}
    6497
    6598/** Prologue for ipc_call_async_*() functions.
     
    100133        if (!call) {
    101134                /* Nothing to do regardless if failed or not */
     135                futex_unlock(&ipc_futex);
    102136                return;
    103137        }
    104138       
    105139        if (callid == (ipc_callid_t) IPC_CALLRET_FATAL) {
     140                futex_unlock(&ipc_futex);
     141               
    106142                /* Call asynchronous handler with error code */
    107143                if (call->callback)
     
    111147                return;
    112148        }
     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);
    113155}
    114156
    115157/** Fast asynchronous call.
    116158 *
    117  * This function can only handle three arguments of payload. It is, however,
     159 * This function can only handle four arguments of payload. It is, however,
    118160 * faster than the more generic ipc_call_async_slow().
    119161 *
     
    129171 * @param arg2        Service-defined payload argument.
    130172 * @param arg3        Service-defined payload argument.
     173 * @param arg4        Service-defined payload argument.
    131174 * @param private     Argument to be passed to the answer/error callback.
    132175 * @param callback    Answer or error callback.
    133176 */
    134177void ipc_call_async_fast(int phoneid, sysarg_t imethod, sysarg_t arg1,
    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        
     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);
    141195        ipc_callid_t callid = __SYSCALL6(SYS_IPC_CALL_ASYNC_FAST, phoneid,
    142             imethod, arg1, arg2, arg3, (sysarg_t) call);
     196            imethod, arg1, arg2, arg3, arg4);
    143197       
    144198        ipc_finish_async(callid, phoneid, call);
     
    171225                return;
    172226       
    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);
     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);
    182242       
    183243        ipc_finish_async(callid, phoneid, call);
     
    236296}
    237297
     298/** Try to dispatch queued calls from the async queue.
     299 *
     300 */
     301static 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
    238342/** 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.
    239350 *
    240351 * @param callid Hash of the received answer.
    241352 * @param data   Call data of the answer.
     353 *
    242354 */
    243355static void handle_answer(ipc_callid_t callid, ipc_call_t *data)
    244356{
    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);
     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);
    253382}
    254383
     
    259388 * @param flags Flags passed to SYS_IPC_WAIT (blocking, nonblocking).
    260389 *
    261  * @return Hash of the call.
     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 *
    262394 */
    263395ipc_callid_t ipc_wait_cycle(ipc_call_t *call, sysarg_t usec,
     
    268400       
    269401        /* Handle received answers */
    270         if (callid && (call->flags & IPC_CALLID_ANSWERED))
     402        if (callid & IPC_CALLID_ANSWERED) {
    271403                handle_answer(callid, call);
     404                dispatch_queued_calls();
     405        }
    272406       
    273407        return callid;
     
    298432        do {
    299433                callid = ipc_wait_cycle(call, usec, SYNCH_FLAGS_NONE);
    300         } while (callid && (call->flags & IPC_CALLID_ANSWERED));
     434        } while (callid & IPC_CALLID_ANSWERED);
    301435       
    302436        return callid;
     
    319453                callid = ipc_wait_cycle(call, SYNCH_NO_TIMEOUT,
    320454                    SYNCH_FLAGS_NON_BLOCKING);
    321         } while (callid && (call->flags & IPC_CALLID_ANSWERED));
     455        } while (callid & IPC_CALLID_ANSWERED);
    322456       
    323457        return callid;
  • uspace/lib/c/include/ipc/common.h

    rac307b2 r0851a3d  
    4343#define IPC_FLAG_BLOCKING  0x01
    4444
    45 struct async_call;
    46 
    4745typedef struct {
    4846        sysarg_t args[IPC_CALL_LEN];
    4947        task_id_t in_task_id;
    5048        sysarg_t in_phone_hash;
    51         unsigned flags;
    52         struct async_call *label;
    5349} ipc_call_t;
    5450
  • uspace/lib/c/include/ipc/ipc.h

    rac307b2 r0851a3d  
    8989
    9090#define ipc_call_async_0(phoneid, method, private, callback) \
    91         ipc_call_async_fast((phoneid), (method), 0, 0, 0, (private), (callback))
     91        ipc_call_async_fast((phoneid), (method), 0, 0, 0, 0, (private), \
     92            (callback))
    9293#define ipc_call_async_1(phoneid, method, arg1, private, callback) \
    93         ipc_call_async_fast((phoneid), (method), (arg1), 0, 0, (private), \
     94        ipc_call_async_fast((phoneid), (method), (arg1), 0, 0, 0, (private), \
    9495            (callback))
    9596#define ipc_call_async_2(phoneid, method, arg1, arg2, private, callback) \
    96         ipc_call_async_fast((phoneid), (method), (arg1), (arg2), 0, \
     97        ipc_call_async_fast((phoneid), (method), (arg1), (arg2), 0, 0, \
    9798            (private), (callback))
    9899#define ipc_call_async_3(phoneid, method, arg1, arg2, arg3, private, callback) \
    99         ipc_call_async_fast((phoneid), (method), (arg1), (arg2), (arg3), \
     100        ipc_call_async_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, \
    100101            (private), (callback))
    101102#define ipc_call_async_4(phoneid, method, arg1, arg2, arg3, arg4, private, \
    102103    callback) \
    103         ipc_call_async_slow((phoneid), (method), (arg1), (arg2), (arg3), \
    104             (arg4), 0, (private), (callback))
     104        ipc_call_async_fast((phoneid), (method), (arg1), (arg2), (arg3), \
     105            (arg4), (private), (callback))
    105106#define ipc_call_async_5(phoneid, method, arg1, arg2, arg3, arg4, arg5, \
    106107    private, callback) \
     
    109110
    110111extern void ipc_call_async_fast(int, sysarg_t, sysarg_t, sysarg_t, sysarg_t,
    111     void *, ipc_async_callback_t);
     112    sysarg_t, void *, ipc_async_callback_t);
    112113extern void ipc_call_async_slow(int, sysarg_t, sysarg_t, sysarg_t, sysarg_t,
    113114    sysarg_t, sysarg_t, void *, ipc_async_callback_t);
Note: See TracChangeset for help on using the changeset viewer.