Changeset a0a134b in mainline for uspace/lib/c


Ignore:
Timestamp:
2011-04-13T18:27:21Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
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.
Message:

Development branch changes

Location:
uspace/lib/c
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/arch/mips32/include/atomic.h

    rd6522dd ra0a134b  
    7070                "       sc %0, %1\n"
    7171                "       beq %0, %4, 1b\n"       /* if the atomic operation failed, try again */
    72                 /*      nop     */              /* nop is inserted automatically by compiler */
    7372                "       nop\n"
    7473                : "=&r" (tmp),
  • uspace/lib/c/generic/adt/measured_strings.c

    rd6522dd ra0a134b  
    7474        new->length = length;
    7575        new->value = ((uint8_t *) new) + sizeof(measured_string_t);
    76         // append terminating zero explicitly - to be safe
     76        /* Append terminating zero explicitly - to be safe */
    7777        memcpy(new->value, string, new->length);
    7878        new->value[new->length] = '\0';
  • uspace/lib/c/generic/async.c

    rd6522dd ra0a134b  
    15861586 * @param dst     Address of the beginning of the destination buffer.
    15871587 * @param size    Size of the destination buffer.
     1588 * @param flags   Flags to control the data transfer.
    15881589 *
    15891590 * @return Zero on success or a negative error code from errno.h.
    15901591 *
    15911592 */
    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);
     1593int
     1594async_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);
    15961598}
    15971599
     
    16831685 * @param src     Address of the beginning of the source buffer.
    16841686 * @param size    Size of the source buffer.
     1687 * @param flags   Flags to control the data transfer.
    16851688 *
    16861689 * @return Zero on success or a negative error code from errno.h.
    16871690 *
    16881691 */
    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);
     1692int
     1693async_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);
    16931698}
    16941699
  • uspace/lib/c/generic/vfs/vfs.c

    rd6522dd ra0a134b  
    378378       
    379379        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);
    381382        if (rc != EOK) {
    382383                vfs_exchange_end(vfs_phone);
     
    407408       
    408409        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);
    410412        if (rc != EOK) {
    411413                vfs_exchange_end(vfs_phone);
  • uspace/lib/c/include/async.h

    rd6522dd ra0a134b  
    341341
    342342extern 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
     346extern int async_data_read_start_generic(int, void *, size_t, int);
    344347extern bool async_data_read_receive(ipc_callid_t *, size_t *);
    345348extern int async_data_read_finalize(ipc_callid_t, const void *, size_t);
     
    380383            (arg4), (answer))
    381384
    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
     388extern int async_data_write_start_generic(int, const void *, size_t, int);
    383389extern bool async_data_write_receive(ipc_callid_t *, size_t *);
    384390extern int async_data_write_finalize(ipc_callid_t, void *, size_t);
Note: See TracChangeset for help on using the changeset viewer.