Changeset d7978525 in mainline for uspace/lib/c/generic/ipc.c


Ignore:
Timestamp:
2012-08-12T19:16:45Z (12 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6266cc6
Parents:
6c34f587
Message:

Implement ipc_*_finalize() functionality directly in async framework.

  • Remove ipc_*_finalize() as these interfaces do not make much sense only on their own.
File:
1 edited

Legend:

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

    r6c34f587 rd7978525  
    4848#include <fibril.h>
    4949#include <macros.h>
    50 #include "private/libc.h"
    5150
    5251/**
     
    567566}
    568567
    569 /** Wrapper for answering the IPC_M_SHARE_IN calls.
    570  *
    571  * This wrapper only makes it more comfortable to answer IPC_M_SHARE_IN
    572  * calls so that the user doesn't have to remember the meaning of each
    573  * IPC argument.
    574  *
    575  * @param callid Hash of the IPC_M_DATA_READ call to answer.
    576  * @param src    Source address space base.
    577  * @param flags Flags to be used for sharing. Bits can be only cleared.
    578  *
    579  * @return Zero on success or a value from @ref errno.h on failure.
    580  *
    581  */
    582 int ipc_share_in_finalize(ipc_callid_t callid, void *src, unsigned int flags)
    583 {
    584         return ipc_answer_3(callid, EOK, (sysarg_t) src, (sysarg_t) flags,
    585             (sysarg_t) __entry);
    586 }
    587 
    588 /** Wrapper for answering the IPC_M_SHARE_OUT calls.
    589  *
    590  * This wrapper only makes it more comfortable to answer IPC_M_SHARE_OUT
    591  * calls so that the user doesn't have to remember the meaning of each
    592  * IPC argument.
    593  *
    594  * @param callid Hash of the IPC_M_DATA_WRITE call to answer.
    595  * @param dst    Destination address space area base address.
    596  *
    597  * @return Zero on success or a value from @ref errno.h on failure.
    598  *
    599  */
    600 int ipc_share_out_finalize(ipc_callid_t callid, void **dst)
    601 {
    602         return ipc_answer_2(callid, EOK, (sysarg_t) __entry, (sysarg_t) dst);
    603 }
    604 
    605 /** Wrapper for answering the IPC_M_DATA_READ calls.
    606  *
    607  * This wrapper only makes it more comfortable to answer IPC_M_DATA_READ
    608  * calls so that the user doesn't have to remember the meaning of each
    609  * IPC argument.
    610  *
    611  * @param callid Hash of the IPC_M_DATA_READ call to answer.
    612  * @param src    Source address for the IPC_M_DATA_READ call.
    613  * @param size   Size for the IPC_M_DATA_READ call. Can be smaller than
    614  *               the maximum size announced by the sender.
    615  *
    616  * @return Zero on success or a value from @ref errno.h on failure.
    617  *
    618  */
    619 int ipc_data_read_finalize(ipc_callid_t callid, const void *src, size_t size)
    620 {
    621         return ipc_answer_2(callid, EOK, (sysarg_t) src, (sysarg_t) size);
    622 }
    623 
    624 /** Wrapper for answering the IPC_M_DATA_WRITE calls.
    625  *
    626  * This wrapper only makes it more comfortable to answer IPC_M_DATA_WRITE
    627  * calls so that the user doesn't have to remember the meaning of each
    628  * IPC argument.
    629  *
    630  * @param callid Hash of the IPC_M_DATA_WRITE call to answer.
    631  * @param dst    Final destination address for the IPC_M_DATA_WRITE call.
    632  * @param size   Final size for the IPC_M_DATA_WRITE call.
    633  *
    634  * @return Zero on success or a value from @ref errno.h on failure.
    635  *
    636  */
    637 int ipc_data_write_finalize(ipc_callid_t callid, void *dst, size_t size)
    638 {
    639         return ipc_answer_2(callid, EOK, (sysarg_t) dst, (sysarg_t) size);
    640 }
    641 
    642568/** Connect to a task specified by id.
    643569 *
Note: See TracChangeset for help on using the changeset viewer.