Changeset 132ab5d1 in mainline for uspace/lib/hound/src/protocol.c


Ignore:
Timestamp:
2018-01-30T03:20:45Z (8 years ago)
Author:
Jenda <jenda.jzqk73@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/fix-logger-deadlock, topic/msim-upgrade, topic/simplify-dev-export
Children:
5a6cc679
Parents:
8bfb163 (diff), 6a5d05b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge commit '6a5d05bd2551e64111bea4f9332dd7448c26ce84' into forwardport

Separate return value from error code in gen_irq_code*().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/hound/src/protocol.c

    r8bfb163 r132ab5d1  
    115115 * @param name Valid string identifier
    116116 * @param record True if the application context wishes to receive data.
    117  * @return Valid ID on success, Error code on failure.
    118  */
    119 hound_context_id_t hound_service_register_context(hound_sess_t *sess,
    120     const char *name, bool record)
     117 *
     118 * @param[out] id  Return context ID.
     119 *
     120 * @return EOK on success, Error code on failure.
     121 */
     122int hound_service_register_context(hound_sess_t *sess,
     123    const char *name, bool record, hound_context_id_t *id)
    121124{
    122125        assert(sess);
     
    134137
    135138        if (ret == EOK)
    136                 async_wait_for(mid, (sysarg_t *)&ret);
     139                async_wait_for(mid, &ret);
    137140
    138141        async_exchange_end(exch);
    139         return ret == EOK ? (hound_context_id_t)IPC_GET_ARG1(call) : ret;
     142        if (ret == EOK) {
     143                *id = (hound_context_id_t)IPC_GET_ARG1(call);
     144        }
     145
     146        return ret;
    140147}
    141148
     
    182189        ipc_call_t res_call;
    183190        aid_t mid = async_send_3(exch, IPC_M_HOUND_GET_LIST, flags, *count,
    184             (bool)connection, &res_call);
     191            connection != NULL, &res_call);
    185192
    186193        int ret = EOK;
     
    190197
    191198        if (ret == EOK)
    192                 async_wait_for(mid, (sysarg_t*)&ret);
     199                async_wait_for(mid, &ret);
    193200
    194201        if (ret != EOK) {
     
    257264        if (ret == EOK)
    258265                ret = async_data_write_start(exch, sink, str_size(sink));
    259         async_wait_for(id, (sysarg_t*)&ret);
     266        async_wait_for(id, &ret);
    260267        async_exchange_end(exch);
    261268        return ret;
     
    283290        if (ret == EOK)
    284291                ret = async_data_write_start(exch, sink, str_size(sink));
    285         async_wait_for(id, (sysarg_t*)&ret);
     292        async_wait_for(id, &ret);
    286293        async_exchange_end(exch);
    287294        return ENOTSUP;
Note: See TracChangeset for help on using the changeset viewer.