Changeset a0a134b in mainline for uspace/lib/c
- Timestamp:
- 2011-04-13T18:27:21Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4c70554
- Parents:
- d6522dd (diff), b77ce84 (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. - Location:
- uspace/lib/c
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/mips32/include/atomic.h
rd6522dd ra0a134b 70 70 " sc %0, %1\n" 71 71 " beq %0, %4, 1b\n" /* if the atomic operation failed, try again */ 72 /* nop */ /* nop is inserted automatically by compiler */73 72 " nop\n" 74 73 : "=&r" (tmp), -
uspace/lib/c/generic/adt/measured_strings.c
rd6522dd ra0a134b 74 74 new->length = length; 75 75 new->value = ((uint8_t *) new) + sizeof(measured_string_t); 76 / / append terminating zero explicitly - to be safe76 /* Append terminating zero explicitly - to be safe */ 77 77 memcpy(new->value, string, new->length); 78 78 new->value[new->length] = '\0'; -
uspace/lib/c/generic/async.c
rd6522dd ra0a134b 1586 1586 * @param dst Address of the beginning of the destination buffer. 1587 1587 * @param size Size of the destination buffer. 1588 * @param flags Flags to control the data transfer. 1588 1589 * 1589 1590 * @return Zero on success or a negative error code from errno.h. 1590 1591 * 1591 1592 */ 1592 int async_data_read_start(int phoneid, void *dst, size_t size) 1593 { 1594 return async_req_2_0(phoneid, IPC_M_DATA_READ, (sysarg_t) dst, 1595 (sysarg_t) size); 1593 int 1594 async_data_read_start_generic(int phoneid, void *dst, size_t size, int flags) 1595 { 1596 return async_req_3_0(phoneid, IPC_M_DATA_READ, (sysarg_t) dst, 1597 (sysarg_t) size, (sysarg_t) flags); 1596 1598 } 1597 1599 … … 1683 1685 * @param src Address of the beginning of the source buffer. 1684 1686 * @param size Size of the source buffer. 1687 * @param flags Flags to control the data transfer. 1685 1688 * 1686 1689 * @return Zero on success or a negative error code from errno.h. 1687 1690 * 1688 1691 */ 1689 int async_data_write_start(int phoneid, const void *src, size_t size) 1690 { 1691 return async_req_2_0(phoneid, IPC_M_DATA_WRITE, (sysarg_t) src, 1692 (sysarg_t) size); 1692 int 1693 async_data_write_start_generic(int phoneid, const void *src, size_t size, 1694 int flags) 1695 { 1696 return async_req_3_0(phoneid, IPC_M_DATA_WRITE, (sysarg_t) src, 1697 (sysarg_t) size, (sysarg_t) flags); 1693 1698 } 1694 1699 -
uspace/lib/c/generic/vfs/vfs.c
rd6522dd ra0a134b 378 378 379 379 req = async_send_1(vfs_phone, VFS_IN_READ, fildes, &answer); 380 rc = async_data_read_start(vfs_phone, (void *)buf, nbyte); 380 rc = async_data_read_start_generic(vfs_phone, (void *) buf, nbyte, 381 IPC_XF_RESTRICT); 381 382 if (rc != EOK) { 382 383 vfs_exchange_end(vfs_phone); … … 407 408 408 409 req = async_send_1(vfs_phone, VFS_IN_WRITE, fildes, &answer); 409 rc = async_data_write_start(vfs_phone, (void *)buf, nbyte); 410 rc = async_data_write_start_generic(vfs_phone, (void *) buf, nbyte, 411 IPC_XF_RESTRICT); 410 412 if (rc != EOK) { 411 413 vfs_exchange_end(vfs_phone); -
uspace/lib/c/include/async.h
rd6522dd ra0a134b 341 341 342 342 extern aid_t async_data_read(int, void *, size_t, ipc_call_t *); 343 extern int async_data_read_start(int, void *, size_t); 343 #define async_data_read_start(p, buf, len) \ 344 async_data_read_start_generic((p), (buf), (len), IPC_XF_NONE) 345 346 extern int async_data_read_start_generic(int, void *, size_t, int); 344 347 extern bool async_data_read_receive(ipc_callid_t *, size_t *); 345 348 extern int async_data_read_finalize(ipc_callid_t, const void *, size_t); … … 380 383 (arg4), (answer)) 381 384 382 extern int async_data_write_start(int, const void *, size_t); 385 #define async_data_write_start(p, buf, len) \ 386 async_data_write_start_generic((p), (buf), (len), IPC_XF_NONE) 387 388 extern int async_data_write_start_generic(int, const void *, size_t, int); 383 389 extern bool async_data_write_receive(ipc_callid_t *, size_t *); 384 390 extern int async_data_write_finalize(ipc_callid_t, void *, size_t);
Note:
See TracChangeset
for help on using the changeset viewer.