Changeset d7978525 in mainline
- Timestamp:
- 2012-08-12T19:16:45Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6266cc6
- Parents:
- 6c34f587
- Location:
- uspace/lib/c
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/async.c
r6c34f587 rd7978525 114 114 #include <stdlib.h> 115 115 #include <macros.h> 116 #include "private/libc.h" 116 117 117 118 #define CLIENT_HASH_TABLE_BUCKETS 32 … … 2166 2167 int async_share_in_finalize(ipc_callid_t callid, void *src, unsigned int flags) 2167 2168 { 2168 return ipc_share_in_finalize(callid, src, flags); 2169 return ipc_answer_3(callid, EOK, (sysarg_t) src, (sysarg_t) flags, 2170 (sysarg_t) __entry); 2169 2171 } 2170 2172 … … 2233 2235 int async_share_out_finalize(ipc_callid_t callid, void **dst) 2234 2236 { 2235 return ipc_ share_out_finalize(callid,dst);2237 return ipc_answer_2(callid, EOK, (sysarg_t) __entry, (sysarg_t) dst); 2236 2238 } 2237 2239 … … 2317 2319 int async_data_read_finalize(ipc_callid_t callid, const void *src, size_t size) 2318 2320 { 2319 return ipc_ data_read_finalize(callid, src,size);2321 return ipc_answer_2(callid, EOK, (sysarg_t) src, (sysarg_t) size); 2320 2322 } 2321 2323 … … 2420 2422 int async_data_write_finalize(ipc_callid_t callid, void *dst, size_t size) 2421 2423 { 2422 return ipc_ data_write_finalize(callid, dst,size);2424 return ipc_answer_2(callid, EOK, (sysarg_t) dst, (sysarg_t) size); 2423 2425 } 2424 2426 -
uspace/lib/c/generic/ipc.c
r6c34f587 rd7978525 48 48 #include <fibril.h> 49 49 #include <macros.h> 50 #include "private/libc.h"51 50 52 51 /** … … 567 566 } 568 567 569 /** Wrapper for answering the IPC_M_SHARE_IN calls.570 *571 * This wrapper only makes it more comfortable to answer IPC_M_SHARE_IN572 * calls so that the user doesn't have to remember the meaning of each573 * 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_OUT591 * calls so that the user doesn't have to remember the meaning of each592 * 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_READ608 * calls so that the user doesn't have to remember the meaning of each609 * 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 than614 * 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_WRITE627 * calls so that the user doesn't have to remember the meaning of each628 * 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 642 568 /** Connect to a task specified by id. 643 569 * -
uspace/lib/c/include/ipc/ipc.h
r6c34f587 rd7978525 125 125 sysarg_t, sysarg_t, sysarg_t, unsigned int); 126 126 127 extern int ipc_share_in_finalize(ipc_callid_t, void *, unsigned int);128 extern int ipc_share_out_finalize(ipc_callid_t, void **);129 extern int ipc_data_read_finalize(ipc_callid_t, const void *, size_t);130 extern int ipc_data_write_finalize(ipc_callid_t, void *, size_t);131 132 127 extern int ipc_connect_kbox(task_id_t); 133 128
Note:
See TracChangeset
for help on using the changeset viewer.