Subversion Repositories HelenOS

Rev

Rev 2617 | Rev 2619 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2617 Rev 2618
Line 442... Line 442...
442
    return 0;
442
    return 0;
443
}
443
}
444
 
444
 
445
/** Make a fast asynchronous call over IPC.
445
/** Make a fast asynchronous call over IPC.
446
 *
446
 *
447
 * This function can only handle two arguments of payload, but is faster than
447
 * This function can only handle four arguments of payload, but is faster than
448
 * the generic function sys_ipc_call_async().
448
 * the generic function sys_ipc_call_async_slow().
449
 *
449
 *
450
 * @param phoneid   Phone handle for the call.
450
 * @param phoneid   Phone handle for the call.
451
 * @param method    Method of the call.
451
 * @param method    Method of the call.
452
 * @param arg1      Service-defined payload argument.
452
 * @param arg1      Service-defined payload argument.
453
 * @param arg2      Service-defined payload argument.
453
 * @param arg2      Service-defined payload argument.
-
 
454
 * @param arg3      Service-defined payload argument.
-
 
455
 * @param arg4      Service-defined payload argument.
454
 *
456
 *
455
 * @return      Return call hash on success.
457
 * @return      Return call hash on success.
456
 *          Return IPC_CALLRET_FATAL in case of a fatal error and
458
 *          Return IPC_CALLRET_FATAL in case of a fatal error and
457
 *          IPC_CALLRET_TEMPORARY if there are too many pending
459
 *          IPC_CALLRET_TEMPORARY if there are too many pending
458
 *          asynchronous requests; answers should be handled first.
460
 *          asynchronous requests; answers should be handled first.
459
 */
461
 */
460
unative_t sys_ipc_call_async_fast(unative_t phoneid, unative_t method,
462
unative_t sys_ipc_call_async_fast(unative_t phoneid, unative_t method,
461
    unative_t arg1, unative_t arg2)
463
    unative_t arg1, unative_t arg2, unative_t arg3, unative_t arg4)
462
{
464
{
463
    call_t *call;
465
    call_t *call;
464
    phone_t *phone;
466
    phone_t *phone;
465
    int res;
467
    int res;
466
 
468
 
Line 471... Line 473...
471
 
473
 
472
    call = ipc_call_alloc(0);
474
    call = ipc_call_alloc(0);
473
    IPC_SET_METHOD(call->data, method);
475
    IPC_SET_METHOD(call->data, method);
474
    IPC_SET_ARG1(call->data, arg1);
476
    IPC_SET_ARG1(call->data, arg1);
475
    IPC_SET_ARG2(call->data, arg2);
477
    IPC_SET_ARG2(call->data, arg2);
476
    IPC_SET_ARG3(call->data, 0);
478
    IPC_SET_ARG3(call->data, arg3);
-
 
479
    IPC_SET_ARG4(call->data, arg4);
477
 
480
 
478
    if (!(res = request_preprocess(call)))
481
    if (!(res = request_preprocess(call)))
479
        ipc_call(phone, call);
482
        ipc_call(phone, call);
480
    else
483
    else
481
        ipc_backsend_err(phone, call, res);
484
        ipc_backsend_err(phone, call, res);
Line 488... Line 491...
488
 * @param phoneid   Phone handle for the call.
491
 * @param phoneid   Phone handle for the call.
489
 * @param data      Userspace address of call data with the request.
492
 * @param data      Userspace address of call data with the request.
490
 *
493
 *
491
 * @return      See sys_ipc_call_async_fast().
494
 * @return      See sys_ipc_call_async_fast().
492
 */
495
 */
493
unative_t sys_ipc_call_async(unative_t phoneid, ipc_data_t *data)
496
unative_t sys_ipc_call_async_slow(unative_t phoneid, ipc_data_t *data)
494
{
497
{
495
    call_t *call;
498
    call_t *call;
496
    phone_t *phone;
499
    phone_t *phone;
497
    int res;
500
    int res;
498
    int rc;
501
    int rc;