Ignore:
Timestamp:
2012-08-21T21:37:54Z (12 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b1e6269
Parents:
1b186ed
Message:

Factor out dealing with call→buffer from process_answer() to
respective IPC_M_CONNECT_ME_TO and IPC_M_DEBUG ops routines.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/ipc/ops/dataread.c

    r1b186ed r13dbaa8c  
    9191}
    9292
     93static int answer_process(call_t *answer)
     94{
     95        if (answer->buffer) {
     96                uintptr_t dst = IPC_GET_ARG1(answer->data);
     97                size_t size = IPC_GET_ARG2(answer->data);
     98                int rc;
     99
     100                rc = copy_to_uspace((void *) dst, answer->buffer, size);
     101                if (rc)
     102                        IPC_SET_RETVAL(answer->data, rc);
     103        }
     104
     105        return EOK;
     106}
     107
    93108sysipc_ops_t ipc_m_data_read_ops = {
    94109        .request_preprocess = request_preprocess,
    95110        .request_process = null_request_process,
    96111        .answer_preprocess = answer_preprocess,
    97         .answer_process = null_answer_process,
     112        .answer_process = answer_process,
    98113};
    99114
Note: See TracChangeset for help on using the changeset viewer.