Changeset 00aece0 in mainline for uspace/lib/c/generic/ipc.c
- Timestamp:
- 2012-02-18T16:47:38Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4449c6c
- Parents:
- bd5f3b7 (diff), f943dd3 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/ipc.c
rbd5f3b7 r00aece0 48 48 #include <fibril.h> 49 49 #include <macros.h> 50 #include "private/libc.h" 50 51 51 52 /** … … 760 761 * 761 762 * @param phoneid Phone that will be used to contact the receiving side. 762 * @param dst Destination address space area base.763 763 * @param size Size of the destination address space area. 764 764 * @param arg User defined argument. 765 765 * @param flags Storage for received flags. Can be NULL. 766 * @param dst Destination address space area base. Cannot be NULL. 766 767 * 767 768 * @return Zero on success or a negative error code from errno.h. 768 769 * 769 770 */ 770 int ipc_share_in_start(int phoneid, void *dst, size_t size, sysarg_t arg, 771 unsigned int *flags) 772 { 773 sysarg_t tmp_flags = 0; 774 int res = ipc_call_sync_3_2(phoneid, IPC_M_SHARE_IN, (sysarg_t) dst, 775 (sysarg_t) size, arg, NULL, &tmp_flags); 771 int ipc_share_in_start(int phoneid, size_t size, sysarg_t arg, 772 unsigned int *flags, void **dst) 773 { 774 sysarg_t _flags = 0; 775 sysarg_t _dst = (sysarg_t) -1; 776 int res = ipc_call_sync_2_4(phoneid, IPC_M_SHARE_IN, (sysarg_t) size, 777 arg, NULL, &_flags, NULL, &_dst); 776 778 777 779 if (flags) 778 *flags = (unsigned int) tmp_flags; 779 780 *flags = (unsigned int) _flags; 781 782 *dst = (void *) _dst; 780 783 return res; 781 784 } … … 783 786 /** Wrapper for answering the IPC_M_SHARE_IN calls. 784 787 * 785 * This wrapper only makes it more comfortable to answer IPC_M_ DATA_READ788 * This wrapper only makes it more comfortable to answer IPC_M_SHARE_IN 786 789 * calls so that the user doesn't have to remember the meaning of each 787 790 * IPC argument. … … 796 799 int ipc_share_in_finalize(ipc_callid_t callid, void *src, unsigned int flags) 797 800 { 798 return ipc_answer_2(callid, EOK, (sysarg_t) src, (sysarg_t) flags); 801 return ipc_answer_3(callid, EOK, (sysarg_t) src, (sysarg_t) flags, 802 (sysarg_t) __entry); 799 803 } 800 804 … … 826 830 * 827 831 */ 828 int ipc_share_out_finalize(ipc_callid_t callid, void * dst)829 { 830 return ipc_answer_ 1(callid, EOK, (sysarg_t) dst);832 int ipc_share_out_finalize(ipc_callid_t callid, void **dst) 833 { 834 return ipc_answer_2(callid, EOK, (sysarg_t) __entry, (sysarg_t) dst); 831 835 } 832 836
Note:
See TracChangeset
for help on using the changeset viewer.