Changeset 05ffb41 in mainline for kernel/generic/src/ipc/sysipc.c
- Timestamp:
- 2017-08-17T19:11:14Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1c85bae
- Parents:
- 7e3826d9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/sysipc.c
r7e3826d9 r05ffb41 264 264 /** Make a call over IPC and wait for reply. 265 265 * 266 * @param phone id Phone handlefor the call.267 * @param data[inout] Structure with request/reply data.268 * @param priv Value to be stored in call->priv.266 * @param phone_cap Phone capability for the call. 267 * @param data[inout] Structure with request/reply data. 268 * @param priv Value to be stored in call->priv. 269 269 * 270 270 * @return EOK on success. … … 272 272 * 273 273 */ 274 int ipc_req_internal(int phone id, ipc_data_t *data, sysarg_t priv)275 { 276 phone_t *phone ;277 if ( phone_get(phoneid, &phone) != EOK)274 int ipc_req_internal(int phone_cap, ipc_data_t *data, sysarg_t priv) 275 { 276 phone_t *phone = phone_get_current(phone_cap); 277 if (!phone) 278 278 return ENOENT; 279 279 … … 350 350 * the generic function sys_ipc_call_async_slow(). 351 351 * 352 * @param phone id Phone handlefor the call.353 * @param imethod Interface and method of the call.354 * @param arg1 Service-defined payload argument.355 * @param arg2 Service-defined payload argument.356 * @param arg3 Service-defined payload argument.357 * @param arg4 Service-defined payload argument.352 * @param phone_cap Phone capability for the call. 353 * @param imethod Interface and method of the call. 354 * @param arg1 Service-defined payload argument. 355 * @param arg2 Service-defined payload argument. 356 * @param arg3 Service-defined payload argument. 357 * @param arg4 Service-defined payload argument. 358 358 * 359 359 * @return Call hash on success. … … 363 363 * 364 364 */ 365 sysarg_t sys_ipc_call_async_fast(sysarg_t phone id, sysarg_t imethod,365 sysarg_t sys_ipc_call_async_fast(sysarg_t phone_cap, sysarg_t imethod, 366 366 sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4) 367 367 { 368 phone_t *phone ;369 if ( phone_get(phoneid, &phone) != EOK)368 phone_t *phone = phone_get_current(phone_cap); 369 if (!phone) 370 370 return IPC_CALLRET_FATAL; 371 371 … … 398 398 /** Make an asynchronous IPC call allowing to transmit the entire payload. 399 399 * 400 * @param phone id Phone handlefor the call.401 * @param data Userspace address of call data with the request.400 * @param phone_cap Phone capability for the call. 401 * @param data Userspace address of call data with the request. 402 402 * 403 403 * @return See sys_ipc_call_async_fast(). 404 404 * 405 405 */ 406 sysarg_t sys_ipc_call_async_slow(sysarg_t phone id, ipc_data_t *data)407 { 408 phone_t *phone ;409 if ( phone_get(phoneid, &phone) != EOK)406 sysarg_t sys_ipc_call_async_slow(sysarg_t phone_cap, ipc_data_t *data) 407 { 408 phone_t *phone = phone_get_current(phone_cap); 409 if (!phone) 410 410 return IPC_CALLRET_FATAL; 411 411 … … 435 435 * Common code for both the fast and the slow version. 436 436 * 437 * @param callid Hash of the call to forward.438 * @param phone id Phone handleto use for forwarding.439 * @param imethod New interface and method to use for the forwarded call.440 * @param arg1 New value of the first argument for the forwarded call.441 * @param arg2 New value of the second argument for the forwarded call.442 * @param arg3 New value of the third argument for the forwarded call.443 * @param arg4 New value of the fourth argument for the forwarded call.444 * @param arg5 New value of the fifth argument for the forwarded call.445 * @param mode Flags that specify mode of the forward operation.446 * @param slow If true, arg3, arg4 and arg5 are considered. Otherwise447 * the function considers only the fast version arguments:448 * i.e. arg1 and arg2.437 * @param callid Hash of the call to forward. 438 * @param phone_cap Phone capability to use for forwarding. 439 * @param imethod New interface and method to use for the forwarded call. 440 * @param arg1 New value of the first argument for the forwarded call. 441 * @param arg2 New value of the second argument for the forwarded call. 442 * @param arg3 New value of the third argument for the forwarded call. 443 * @param arg4 New value of the fourth argument for the forwarded call. 444 * @param arg5 New value of the fifth argument for the forwarded call. 445 * @param mode Flags that specify mode of the forward operation. 446 * @param slow If true, arg3, arg4 and arg5 are considered. Otherwise 447 * the function considers only the fast version arguments: 448 * i.e. arg1 and arg2. 449 449 * 450 450 * @return 0 on succes, otherwise an error code. … … 453 453 * 454 454 */ 455 static sysarg_t sys_ipc_forward_common(sysarg_t callid, sysarg_t phone id,455 static sysarg_t sys_ipc_forward_common(sysarg_t callid, sysarg_t phone_cap, 456 456 sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, 457 457 sysarg_t arg4, sysarg_t arg5, unsigned int mode, bool slow) … … 468 468 bool after_forward = false; 469 469 int rc; 470 phone_t *phone; 471 472 if ( phone_get(phoneid, &phone) != EOK) {470 471 phone_t *phone = phone_get_current(phone_cap); 472 if (!phone) { 473 473 rc = ENOENT; 474 474 goto error; … … 685 685 /** Hang up a phone. 686 686 * 687 * @param Phone handleof the phone to be hung up.687 * @param phone_cap Phone capability of the phone to be hung up. 688 688 * 689 689 * @return 0 on success or an error code. 690 690 * 691 691 */ 692 sysarg_t sys_ipc_hangup(sysarg_t phoneid) 693 { 694 phone_t *phone; 695 696 if (phone_get(phoneid, &phone) != EOK) 692 sysarg_t sys_ipc_hangup(sysarg_t phone_cap) 693 { 694 phone_t *phone = phone_get_current(phone_cap); 695 if (!phone) 697 696 return ENOENT; 698 697
Note:
See TracChangeset
for help on using the changeset viewer.