Changeset 3115355 in mainline for uspace/lib/libc/generic/ipc.c


Ignore:
Timestamp:
2007-12-31T10:14:38Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
27d293a
Parents:
badbd888
Message:

Simplify the IPC_M_DATA_WRITE protocol. Do not pass the source address space
virtual address to the recipient. This feature was not used anyway. Now
IPC_M_DATA_WRITE and IPC_M_DATA_READ are feature-aligned.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/generic/ipc.c

    rbadbd888 r3115355  
    736736int ipc_data_write_send(int phoneid, void *src, size_t size)
    737737{
    738         return ipc_call_sync_3_0(phoneid, IPC_M_DATA_WRITE, 0, (ipcarg_t) src,
     738        return ipc_call_sync_2_0(phoneid, IPC_M_DATA_WRITE, (ipcarg_t) src,
    739739            (ipcarg_t) size);
    740740}
     
    749749 * @param callid        Storage where the hash of the IPC_M_DATA_WRITE call will
    750750 *                      be stored.
    751  * @param dst           Storage where the suggested destination address will
    752  *                      be stored. May be NULL.
    753751 * @param size          Storage where the suggested size will be stored. May be
    754752 *                      NULL
     
    756754 * @return              Non-zero on success, zero on failure.
    757755 */
    758 int ipc_data_write_receive(ipc_callid_t *callid, void **dst, size_t *size)
     756int ipc_data_write_receive(ipc_callid_t *callid, size_t *size)
    759757{
    760758        ipc_call_t data;
     
    765763        if (IPC_GET_METHOD(data) != IPC_M_DATA_WRITE)
    766764                return 0;
    767         if (dst)
    768                 *dst = (void *) IPC_GET_ARG1(data);
    769765        if (size)
    770                 *size = (size_t) IPC_GET_ARG3(data);
     766                *size = (size_t) IPC_GET_ARG2(data);
    771767        return 1;
    772768}
     
    785781int ipc_data_write_deliver(ipc_callid_t callid, void *dst, size_t size)
    786782{
    787         return ipc_answer_3(callid, EOK, (ipcarg_t) dst, 0, (ipcarg_t) size);
     783        return ipc_answer_2(callid, EOK, (ipcarg_t) dst, (ipcarg_t) size);
    788784}
    789785 
Note: See TracChangeset for help on using the changeset viewer.