Changeset 9e40d443 in mainline


Ignore:
Timestamp:
2013-04-04T16:35:49Z (11 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4b33db8e
Parents:
5029c788
Message:

libhound: add drain iface

Location:
uspace/lib/hound
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/hound/include/hound/protocol.h

    r5029c788 r9e40d443  
    102102            void **);
    103103        int (*rem_stream)(void *, void *);
     104        int (*drain_stream)(void *);
    104105        int (*stream_data_write)(void *, const void *, size_t);
    105106        int (*stream_data_read)(void *, void *, size_t);
  • uspace/lib/hound/src/protocol.c

    r5029c788 r9e40d443  
    511511        ipc_call_t call;
    512512        size_t size = 0;
    513         while (async_data_read_receive_call(&callid, &call, &size)) {
     513        while (async_data_read_receive_call(&callid, &call, &size)
     514            || (IPC_GET_IMETHOD(call) == IPC_M_HOUND_STREAM_DRAIN)) {
     515                if (IPC_GET_IMETHOD(call) == IPC_M_HOUND_STREAM_DRAIN) {
     516                        int ret = ENOTSUP;
     517                        if (server_iface->drain_stream)
     518                                ret = server_iface->drain_stream(stream);
     519                        async_answer_0(callid, ret);
     520                        continue;
     521                }
    514522                char *buffer = malloc(size);
    515523                if (!buffer) {
Note: See TracChangeset for help on using the changeset viewer.