Changeset 085bd54 in mainline for libc/generic/io/stream.c


Ignore:
Timestamp:
2006-06-06T15:16:08Z (18 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
63bb83e
Parents:
d7eafd8
Message:

Revised ipc. Now it is preferrable to use only functions from async.h, they
take care of correct buffering, waiting for answers etc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libc/generic/io/stream.c

    rd7eafd8 r085bd54  
    6565
    6666        while (i < count) {
    67                 if (sync_send_2(streams[0].phone, CONSOLE_GETCHAR, 0, 0, &r0, &r1) < 0) {
     67                if (async_req_2(streams[0].phone, CONSOLE_GETCHAR, 0, 0, &r0, &r1) < 0) {
    6868                        return -1;
    6969                }
     
    7979
    8080        for (i = 0; i < count; i++)
    81                 send_call(streams[1].phone, CONSOLE_PUTCHAR, ((const char *)buf)[i]);
     81                async_msg(streams[1].phone, CONSOLE_PUTCHAR, ((const char *)buf)[i]);
    8282       
    8383        return count;
     
    131131{
    132132        int c = 0;
    133        
     133
    134134        while (((streams[c].w) || (streams[c].r)) && (c < FDS))
    135135                c++;
     
    160160ssize_t write(int fd, const void *buf, size_t count)
    161161{
     162//      __SYSCALL3(SYS_IO, 1, (sysarg_t)buf, (sysarg_t) count);
     163//      return count;
    162164        if (fd < FDS)
    163165                return streams[fd].w(streams[fd].param, buf, count);
Note: See TracChangeset for help on using the changeset viewer.