Changeset 32e4643 in mainline


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

Always remember the original request method so that it is actually
possible to call ops→answer_process().

Location:
kernel/generic
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/ipc/ipc.h

    r0343a1b r32e4643  
    143143        /** Data passed from/to userspace. */
    144144        ipc_data_t data;
    145        
     145
     146        /** Method as it was sent in the request. */
     147        sysarg_t request_method;
     148
    146149        /** Buffer for IPC_M_DATA_WRITE and IPC_M_DATA_READ. */
    147150        uint8_t *buffer;
  • kernel/generic/src/ipc/sysipc.c

    r0343a1b r32e4643  
    198198       
    199199
    200         sysipc_ops_t *ops = sysipc_ops_get(IPC_GET_IMETHOD(*olddata));
     200        sysipc_ops_t *ops = sysipc_ops_get(answer->request_method);
    201201        if (ops->answer_preprocess)
    202202                rc = ops->answer_preprocess(answer, olddata);
     
    219219        int rc = EOK;
    220220
    221         sysipc_ops_t *ops = sysipc_ops_get(IPC_GET_IMETHOD(call->data));
     221        call->request_method = IPC_GET_IMETHOD(call->data);
     222
     223        sysipc_ops_t *ops = sysipc_ops_get(call->request_method);
    222224        if (ops->request_preprocess)
    223225                rc = ops->request_preprocess(call, phone);
     
    262264                call->buffer = NULL;
    263265        }
     266
     267        sysipc_ops_t *ops = sysipc_ops_get(call->request_method);
     268        if (ops->answer_process)
     269                (void) ops->answer_process(call);
    264270}
    265271
     
    278284        int rc = EOK;
    279285
    280         sysipc_ops_t *ops = sysipc_ops_get(IPC_GET_IMETHOD(call->data));
     286        sysipc_ops_t *ops = sysipc_ops_get(call->request_method);
    281287        if (ops->request_process)
    282288                rc = ops->request_process(call, box);
Note: See TracChangeset for help on using the changeset viewer.