Changeset 153cc76a in mainline for uspace/lib/c/generic/async.c


Ignore:
Timestamp:
2011-12-23T16:42:22Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7e1b130
Parents:
4291215 (diff), 2f0dd2a (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:

Mainline changes.

File:
1 edited

Legend:

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

    r4291215 r153cc76a  
    19981998 *
    19991999 * @param exch  Exchange for sending the message.
    2000  * @param dst   Destination address space area base.
    20012000 * @param size  Size of the destination address space area.
    20022001 * @param arg   User defined argument.
    20032002 * @param flags Storage for the received flags. Can be NULL.
     2003 * @param dst   Destination address space area base. Cannot be NULL.
    20042004 *
    20052005 * @return Zero on success or a negative error code from errno.h.
    20062006 *
    20072007 */
    2008 int async_share_in_start(async_exch_t *exch, void *dst, size_t size,
    2009     sysarg_t arg, unsigned int *flags)
     2008int async_share_in_start(async_exch_t *exch, size_t size, sysarg_t arg,
     2009    unsigned int *flags, void **dst)
    20102010{
    20112011        if (exch == NULL)
    20122012                return ENOENT;
    20132013       
    2014         sysarg_t tmp_flags;
    2015         int res = async_req_3_2(exch, IPC_M_SHARE_IN, (sysarg_t) dst,
    2016             (sysarg_t) size, arg, NULL, &tmp_flags);
     2014        sysarg_t _flags = 0;
     2015        sysarg_t _dst = (sysarg_t) -1;
     2016        int res = async_req_2_4(exch, IPC_M_SHARE_IN, (sysarg_t) size,
     2017            arg, NULL, &_flags, NULL, &_dst);
    20172018       
    20182019        if (flags)
    2019                 *flags = (unsigned int) tmp_flags;
    2020        
     2020                *flags = (unsigned int) _flags;
     2021       
     2022        *dst = (void *) _dst;
    20212023        return res;
    20222024}
     
    20472049                return false;
    20482050       
    2049         *size = (size_t) IPC_GET_ARG2(data);
     2051        *size = (size_t) IPC_GET_ARG1(data);
    20502052        return true;
    20512053}
     
    20532055/** Wrapper for answering the IPC_M_SHARE_IN calls using the async framework.
    20542056 *
    2055  * This wrapper only makes it more comfortable to answer IPC_M_DATA_READ
     2057 * This wrapper only makes it more comfortable to answer IPC_M_SHARE_IN
    20562058 * calls so that the user doesn't have to remember the meaning of each IPC
    20572059 * argument.
     
    21312133 *
    21322134 */
    2133 int async_share_out_finalize(ipc_callid_t callid, void *dst)
     2135int async_share_out_finalize(ipc_callid_t callid, void **dst)
    21342136{
    21352137        return ipc_share_out_finalize(callid, dst);
Note: See TracChangeset for help on using the changeset viewer.