Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/async.c

    r9934f7d r1c6436a  
    166166        /** Call data of the opening call. */
    167167        ipc_call_t call;
    168         /** Local argument or NULL if none. */
    169         void *carg;
    170168       
    171169        /** Identification of the closing call. */
     
    173171       
    174172        /** Fibril function that will be used to handle the connection. */
    175         async_client_conn_t cfibril;
     173        void (*cfibril)(ipc_callid_t, ipc_call_t *);
    176174} connection_t;
    177175
     
    213211 * This function is defined as a weak symbol - to be redefined in user code.
    214212 *
    215  * @param callid        Hash of the incoming call.
    216  * @param call          Data of the incoming call.
    217  * @param arg           Local argument
    218  *
    219  */
    220 static void default_client_connection(ipc_callid_t callid, ipc_call_t *call,
    221     void *arg)
     213 * @param callid Hash of the incoming call.
     214 * @param call   Data of the incoming call.
     215 *
     216 */
     217static void default_client_connection(ipc_callid_t callid, ipc_call_t *call)
    222218{
    223219        ipc_answer_0(callid, ENOENT);
     
    228224 * This function is defined as a weak symbol - to be redefined in user code.
    229225 *
    230  * @param callid        Hash of the incoming call.
    231  * @param call          Data of the incoming call.
    232  * @param arg           Local argument.
     226 * @param callid Hash of the incoming call.
     227 * @param call   Data of the incoming call.
    233228 *
    234229 */
     
    238233
    239234static async_client_conn_t client_connection = default_client_connection;
    240 static async_interrupt_handler_t interrupt_received = default_interrupt_received;
     235static async_client_conn_t interrupt_received = default_interrupt_received;
    241236
    242237/** Setter for client_connection function pointer.
     
    255250 *             notification fibril.
    256251 */
    257 void async_set_interrupt_received(async_interrupt_handler_t intr)
     252void async_set_interrupt_received(async_client_conn_t intr)
    258253{
    259254        interrupt_received = intr;
     
    638633         */
    639634        fibril_connection->cfibril(fibril_connection->callid,
    640             &fibril_connection->call, fibril_connection->carg);
     635            &fibril_connection->call);
    641636       
    642637        /*
     
    709704 * @param cfibril       Fibril function that should be called upon opening the
    710705 *                      connection.
    711  * @param carg          Extra argument to pass to the connection fibril
    712706 *
    713707 * @return New fibril id or NULL on failure.
     
    716710fid_t async_new_connection(sysarg_t in_task_hash, sysarg_t in_phone_hash,
    717711    ipc_callid_t callid, ipc_call_t *call,
    718     async_client_conn_t cfibril, void *carg)
     712    async_client_conn_t cfibril)
    719713{
    720714        connection_t *conn = malloc(sizeof(*conn));
     
    731725        conn->callid = callid;
    732726        conn->close_callid = 0;
    733         conn->carg = carg;
    734727       
    735728        if (call)
     
    786779                /* Open new connection with fibril, etc. */
    787780                async_new_connection(call->in_task_hash, IPC_GET_ARG5(*call),
    788                     callid, call, client_connection, NULL);
     781                    callid, call, client_connection);
    789782                return;
    790783        }
     
    14211414 */
    14221415int async_connect_to_me(async_exch_t *exch, sysarg_t arg1, sysarg_t arg2,
    1423     sysarg_t arg3, async_client_conn_t client_receiver, void *carg)
     1416    sysarg_t arg3, async_client_conn_t client_receiver)
    14241417{
    14251418        if (exch == NULL)
     
    14351428        if (client_receiver != NULL)
    14361429                async_new_connection(task_hash, phone_hash, 0, NULL,
    1437                     client_receiver, carg);
     1430                    client_receiver);
    14381431       
    14391432        return EOK;
Note: See TracChangeset for help on using the changeset viewer.