Changeset b7068da in mainline for uspace/lib/c/generic/async.c


Ignore:
Timestamp:
2012-02-09T20:35:12Z (12 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
591762c6
Parents:
7cede12c (diff), 3d4750f (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 mainline changes

File:
1 edited

Legend:

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

    r7cede12c rb7068da  
    257257void async_set_client_data_constructor(async_client_data_ctor_t ctor)
    258258{
     259        assert(async_client_data_create == default_client_data_constructor);
    259260        async_client_data_create = ctor;
    260261}
     
    262263void async_set_client_data_destructor(async_client_data_dtor_t dtor)
    263264{
     265        assert(async_client_data_destroy == default_client_data_destructor);
    264266        async_client_data_destroy = dtor;
    265267}
     
    303305void async_set_client_connection(async_client_conn_t conn)
    304306{
     307        assert(client_connection == default_client_connection);
    305308        client_connection = conn;
    306309}
     
    18461849       
    18471850        fibril_mutex_lock(&async_sess_mutex);
    1848 
     1851       
    18491852        int rc = async_hangup_internal(sess->phone);
    18501853       
     
    19982001 *
    19992002 * @param exch  Exchange for sending the message.
    2000  * @param dst   Destination address space area base.
    20012003 * @param size  Size of the destination address space area.
    20022004 * @param arg   User defined argument.
    20032005 * @param flags Storage for the received flags. Can be NULL.
     2006 * @param dst   Destination address space area base. Cannot be NULL.
    20042007 *
    20052008 * @return Zero on success or a negative error code from errno.h.
    20062009 *
    20072010 */
    2008 int async_share_in_start(async_exch_t *exch, void *dst, size_t size,
    2009     sysarg_t arg, unsigned int *flags)
     2011int async_share_in_start(async_exch_t *exch, size_t size, sysarg_t arg,
     2012    unsigned int *flags, void **dst)
    20102013{
    20112014        if (exch == NULL)
    20122015                return ENOENT;
    20132016       
    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);
     2017        sysarg_t _flags = 0;
     2018        sysarg_t _dst = (sysarg_t) -1;
     2019        int res = async_req_2_4(exch, IPC_M_SHARE_IN, (sysarg_t) size,
     2020            arg, NULL, &_flags, NULL, &_dst);
    20172021       
    20182022        if (flags)
    2019                 *flags = (unsigned int) tmp_flags;
    2020        
     2023                *flags = (unsigned int) _flags;
     2024       
     2025        *dst = (void *) _dst;
    20212026        return res;
    20222027}
     
    20472052                return false;
    20482053       
    2049         *size = (size_t) IPC_GET_ARG2(data);
     2054        *size = (size_t) IPC_GET_ARG1(data);
    20502055        return true;
    20512056}
     
    20532058/** Wrapper for answering the IPC_M_SHARE_IN calls using the async framework.
    20542059 *
    2055  * This wrapper only makes it more comfortable to answer IPC_M_DATA_READ
     2060 * This wrapper only makes it more comfortable to answer IPC_M_SHARE_IN
    20562061 * calls so that the user doesn't have to remember the meaning of each IPC
    20572062 * argument.
     
    21312136 *
    21322137 */
    2133 int async_share_out_finalize(ipc_callid_t callid, void *dst)
     2138int async_share_out_finalize(ipc_callid_t callid, void **dst)
    21342139{
    21352140        return ipc_share_out_finalize(callid, dst);
Note: See TracChangeset for help on using the changeset viewer.