Rev 2601 | Rev 2617 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 2601 | Rev 2615 | ||
|---|---|---|---|
| Line 346... | Line 346... | ||
| 346 | return 0; |
346 | return 0; |
| 347 | } |
347 | } |
| 348 | 348 | ||
| 349 | /** Make a fast call over IPC, wait for reply and return to user. |
349 | /** Make a fast call over IPC, wait for reply and return to user. |
| 350 | * |
350 | * |
| 351 | * This function can handle only one argument of payload, but is faster than |
351 | * This function can handle only three arguments of payload, but is faster than |
| 352 | * the generic function (i.e. sys_ipc_call_sync()). |
352 | * the generic function (i.e. sys_ipc_call_sync_slow()). |
| 353 | * |
353 | * |
| 354 | * @param phoneid Phone handle for the call. |
354 | * @param phoneid Phone handle for the call. |
| 355 | * @param method Method of the call. |
355 | * @param method Method of the call. |
| 356 | * @param arg1 Service-defined payload argument. |
356 | * @param arg1 Service-defined payload argument. |
| - | 357 | * @param arg2 Service-defined payload argument. |
|
| - | 358 | * @param arg3 Service-defined payload argument. |
|
| 357 | * @param data Address of userspace structure where the reply call will |
359 | * @param data Address of userspace structure where the reply call will |
| 358 | * be stored. |
360 | * be stored. |
| 359 | * |
361 | * |
| 360 | * @return Returns 0 on success. |
362 | * @return Returns 0 on success. |
| 361 | * Return ENOENT if there is no such phone handle. |
363 | * Return ENOENT if there is no such phone handle. |
| 362 | */ |
364 | */ |
| 363 | unative_t sys_ipc_call_sync_fast(unative_t phoneid, unative_t method, |
365 | unative_t sys_ipc_call_sync_fast(unative_t phoneid, unative_t method, |
| 364 | unative_t arg1, ipc_data_t *data) |
366 | unative_t arg1, unative_t arg2, unative_t arg3, ipc_data_t *data) |
| 365 | { |
367 | { |
| 366 | call_t call; |
368 | call_t call; |
| 367 | phone_t *phone; |
369 | phone_t *phone; |
| 368 | int res; |
370 | int res; |
| 369 | 371 | ||
| 370 | GET_CHECK_PHONE(phone, phoneid, return ENOENT); |
372 | GET_CHECK_PHONE(phone, phoneid, return ENOENT); |
| 371 | 373 | ||
| 372 | ipc_call_static_init(&call); |
374 | ipc_call_static_init(&call); |
| 373 | IPC_SET_METHOD(call.data, method); |
375 | IPC_SET_METHOD(call.data, method); |
| 374 | IPC_SET_ARG1(call.data, arg1); |
376 | IPC_SET_ARG1(call.data, arg1); |
| - | 377 | IPC_SET_ARG2(call.data, arg2); |
|
| - | 378 | IPC_SET_ARG3(call.data, arg3); |
|
| 375 | 379 | ||
| 376 | if (!(res = request_preprocess(&call))) { |
380 | if (!(res = request_preprocess(&call))) { |
| 377 | ipc_call_sync(phone, &call); |
381 | ipc_call_sync(phone, &call); |
| 378 | process_answer(&call); |
382 | process_answer(&call); |
| 379 | } else { |
383 | } else { |
| Line 391... | Line 395... | ||
| 391 | * @param reply Userspace address of call data where to store the |
395 | * @param reply Userspace address of call data where to store the |
| 392 | * answer. |
396 | * answer. |
| 393 | * |
397 | * |
| 394 | * @return Zero on success or an error code. |
398 | * @return Zero on success or an error code. |
| 395 | */ |
399 | */ |
| 396 | unative_t sys_ipc_call_sync(unative_t phoneid, ipc_data_t *question, |
400 | unative_t sys_ipc_call_sync_slow(unative_t phoneid, ipc_data_t *question, |
| 397 | ipc_data_t *reply) |
401 | ipc_data_t *reply) |
| 398 | { |
402 | { |
| 399 | call_t call; |
403 | call_t call; |
| 400 | phone_t *phone; |
404 | phone_t *phone; |
| 401 | int res; |
405 | int res; |