Ignore:
File:
1 edited

Legend:

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

    rd768d4c8 rdf956b9b  
    20902090 * @param arg   User defined argument.
    20912091 * @param flags Storage for the received flags. Can be NULL.
    2092  * @param dst   Destination address space area base. Cannot be NULL.
     2092 * @param dst   Address of the storage for the destination address space area
     2093 *              base address. Cannot be NULL.
    20932094 *
    20942095 * @return Zero on success or a negative error code from errno.h.
     
    22182219 *
    22192220 * @param callid Hash of the IPC_M_DATA_WRITE call to answer.
    2220  * @param dst    Destination address space area base address.
     2221 * @param dst    Address of the storage for the destination address space area
     2222 *               base address.
    22212223 *
    22222224 * @return Zero on success or a value from @ref errno.h on failure.
     
    22792281bool async_data_read_receive(ipc_callid_t *callid, size_t *size)
    22802282{
     2283        assert(callid);
     2284       
    22812285        ipc_call_t data;
    2282         return async_data_read_receive_call(callid, &data, size);
    2283 }
    2284 
    2285 /** Wrapper for receiving the IPC_M_DATA_READ calls using the async framework.
    2286  *
    2287  * This wrapper only makes it more comfortable to receive IPC_M_DATA_READ
    2288  * calls so that the user doesn't have to remember the meaning of each IPC
    2289  * argument.
    2290  *
    2291  * So far, this wrapper is to be used from within a connection fibril.
    2292  *
    2293  * @param callid Storage for the hash of the IPC_M_DATA_READ.
    2294  * @param size   Storage for the maximum size. Can be NULL.
    2295  *
    2296  * @return True on success, false on failure.
    2297  *
    2298  */
    2299 bool async_data_read_receive_call(ipc_callid_t *callid, ipc_call_t *data,
    2300     size_t *size)
    2301 {
    2302         assert(callid);
    2303         assert(data);
    2304        
    2305         *callid = async_get_call(data);
    2306        
    2307         if (IPC_GET_IMETHOD(*data) != IPC_M_DATA_READ)
     2286        *callid = async_get_call(&data);
     2287       
     2288        if (IPC_GET_IMETHOD(data) != IPC_M_DATA_READ)
    23082289                return false;
    23092290       
    23102291        if (size)
    2311                 *size = (size_t) IPC_GET_ARG2(*data);
     2292                *size = (size_t) IPC_GET_ARG2(data);
    23122293       
    23132294        return true;
     
    24042385bool async_data_write_receive(ipc_callid_t *callid, size_t *size)
    24052386{
     2387        assert(callid);
     2388       
    24062389        ipc_call_t data;
    2407         return async_data_write_receive_call(callid, &data, size);
    2408 }
    2409 
    2410 /** Wrapper for receiving the IPC_M_DATA_WRITE calls using the async framework.
    2411  *
    2412  * This wrapper only makes it more comfortable to receive IPC_M_DATA_WRITE
    2413  * calls so that the user doesn't have to remember the meaning of each IPC
    2414  * argument.
    2415  *
    2416  * So far, this wrapper is to be used from within a connection fibril.
    2417  *
    2418  * @param callid Storage for the hash of the IPC_M_DATA_WRITE.
    2419  * @param data   Storage for the ipc call data.
    2420  * @param size   Storage for the suggested size. May be NULL.
    2421  *
    2422  * @return True on success, false on failure.
    2423  *
    2424  */
    2425 bool async_data_write_receive_call(ipc_callid_t *callid, ipc_call_t *data,
    2426     size_t *size)
    2427 {
    2428         assert(callid);
    2429         assert(data);
    2430        
    2431         *callid = async_get_call(data);
    2432        
    2433         if (IPC_GET_IMETHOD(*data) != IPC_M_DATA_WRITE)
     2390        *callid = async_get_call(&data);
     2391       
     2392        if (IPC_GET_IMETHOD(data) != IPC_M_DATA_WRITE)
    24342393                return false;
    24352394       
    24362395        if (size)
    2437                 *size = (size_t) IPC_GET_ARG2(*data);
     2396                *size = (size_t) IPC_GET_ARG2(data);
    24382397       
    24392398        return true;
Note: See TracChangeset for help on using the changeset viewer.