Ignore:
Timestamp:
2017-12-08T21:03:35Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c8211849
Parents:
f77c1c9
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-07 21:23:47)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-08 21:03:35)
Message:

Return value from hw_res_dma_channel_remain separately from error code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/device/hw_res.c

    rf77c1c9 rc19a5a59  
    140140 * @param channel DMA channel.
    141141 *
    142  * @return Number of bytes remaining in the buffer if positive.
    143  * @return Error code if negative.
     142 * @param[out] rem Number of bytes remaining in the buffer if positive.
     143 *
     144 * @return Error code.
    144145 *
    145146 */
    146 int hw_res_dma_channel_remain(async_sess_t *sess, unsigned channel)
     147int hw_res_dma_channel_remain(async_sess_t *sess, unsigned channel, size_t *rem)
    147148{
    148149        async_exch_t *exch = async_exchange_begin(sess);
     
    155156       
    156157        if (ret == EOK)
    157                 return remain;
     158                *rem = remain;
    158159       
    159160        return ret;
Note: See TracChangeset for help on using the changeset viewer.