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


Ignore:
Timestamp:
2007-12-23T19:45:30Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
654b7db
Parents:
5c786d1
Message:

Rename IPC_M_DATA_SEND to IPC_M_DATA_WRITE. Now, when we also add
IPC_M_DATA_READ, it will not clash and cause confusion with userspace wrappers
such as ipc_data_receive(). Rename the forementioned wrappers to
ipc_data_write_send(), ipc_data_write_receive() and ipc_data_write_deliver().

File:
1 edited

Legend:

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

    r5c786d1 r36d852c  
    667667}
    668668
    669 /** Wrapper for making IPC_M_DATA_SEND calls.
     669/** Wrapper for making IPC_M_DATA_WRITE calls.
    670670 *
    671671 * @param phoneid       Phone that will be used to contact the receiving side.
     
    675675 * @return              Zero on success or a negative error code from errno.h.
    676676 */
    677 int ipc_data_send(int phoneid, void *src, size_t size)
    678 {
    679         return ipc_call_sync_3_0(phoneid, IPC_M_DATA_SEND, 0, (ipcarg_t) src,
     677int ipc_data_write_send(int phoneid, void *src, size_t size)
     678{
     679        return ipc_call_sync_3_0(phoneid, IPC_M_DATA_WRITE, 0, (ipcarg_t) src,
    680680            (ipcarg_t) size);
    681681}
    682682
    683 /** Wrapper for receiving the IPC_M_DATA_SEND calls.
    684  *
    685  * This wrapper only makes it more comfortable to receive IPC_M_DATA_SEND calls
     683/** Wrapper for receiving the IPC_M_DATA_WRITE calls.
     684 *
     685 * This wrapper only makes it more comfortable to receive IPC_M_DATA_WRITE calls
    686686 * so that the user doesn't have to remember the meaning of each IPC argument.
    687687 *
    688688 * So far, this wrapper is to be used from within a connection fibril.
    689689 *
    690  * @param callid        Storage where the hash of the IPC_M_DATA_SEND call will
     690 * @param callid        Storage where the hash of the IPC_M_DATA_WRITE call will
    691691 *                      be stored.
    692692 * @param dst           Storage where the suggested destination address will
     
    697697 * @return              Non-zero on success, zero on failure.
    698698 */
    699 int ipc_data_receive(ipc_callid_t *callid, void **dst, size_t *size)
     699int ipc_data_write_receive(ipc_callid_t *callid, void **dst, size_t *size)
    700700{
    701701        ipc_call_t data;
     
    704704
    705705        *callid = async_get_call(&data);
    706         if (IPC_GET_METHOD(data) != IPC_M_DATA_SEND)
     706        if (IPC_GET_METHOD(data) != IPC_M_DATA_WRITE)
    707707                return 0;
    708708        if (dst)
     
    713713}
    714714
    715 /** Wrapper for answering the IPC_M_DATA_SEND calls.
    716  *
    717  * This wrapper only makes it more comfortable to answer IPC_M_DATA_SEND calls
     715/** Wrapper for answering the IPC_M_DATA_WRITE calls.
     716 *
     717 * This wrapper only makes it more comfortable to answer IPC_M_DATA_WRITE calls
    718718 * so that the user doesn't have to remember the meaning of each IPC argument.
    719719 *
    720  * @param callid        Hash of the IPC_M_DATA_SEND call to answer.
    721  * @param dst           Final destination address for the IPC_M_DATA_SEND call.
    722  * @param size          Final size for the IPC_M_DATA_SEND call.
     720 * @param callid        Hash of the IPC_M_DATA_WRITE call to answer.
     721 * @param dst           Final destination address for the IPC_M_DATA_WRITE call.
     722 * @param size          Final size for the IPC_M_DATA_WRITE call.
    723723 *
    724724 * @return              Zero on success or a value from @ref errno.h on failure.
    725725 */
    726 ipcarg_t ipc_data_deliver(ipc_callid_t callid, void *dst, size_t size)
     726ipcarg_t ipc_data_write_deliver(ipc_callid_t callid, void *dst, size_t size)
    727727{
    728728        return ipc_answer_3(callid, EOK, (ipcarg_t) dst, 0, (ipcarg_t) size);
Note: See TracChangeset for help on using the changeset viewer.