Changeset 7f1c620 in mainline for generic/src/ipc/sysipc.c
- Timestamp:
- 2006-07-04T17:17:56Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0ffa3ef5
- Parents:
- 991779c5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/ipc/sysipc.c
r991779c5 r7f1c620 57 57 58 58 /** Return true if the method is a system method */ 59 static inline int is_system_method( __nativemethod)59 static inline int is_system_method(unative_t method) 60 60 { 61 61 if (method <= IPC_M_LAST_SYSTEM) … … 69 69 * it is useless 70 70 */ 71 static inline int is_forwardable( __nativemethod)71 static inline int is_forwardable(unative_t method) 72 72 { 73 73 if (method == IPC_M_PHONE_HUNGUP || method == IPC_M_AS_AREA_SEND \ … … 132 132 phone_connect(phoneid,&answer->sender->answerbox); 133 133 /* Set 'phone identification' as arg3 of response */ 134 IPC_SET_ARG3(answer->data, ( __native)&TASK->phones[phoneid]);134 IPC_SET_ARG3(answer->data, (unative_t)&TASK->phones[phoneid]); 135 135 } 136 136 } else if (IPC_GET_METHOD(*olddata) == IPC_M_CONNECT_ME_TO) { … … 192 192 return ELIMIT; 193 193 /* Set arg3 for server */ 194 IPC_SET_ARG3(call->data, ( __native)&TASK->phones[newphid]);194 IPC_SET_ARG3(call->data, (unative_t)&TASK->phones[newphid]); 195 195 call->flags |= IPC_CALL_CONN_ME_TO; 196 196 call->private = newphid; … … 254 254 -2 on 'Too many async request, handle answers first 255 255 */ 256 __native sys_ipc_call_sync_fast(__native phoneid, __nativemethod,257 __nativearg1, ipc_data_t *data)256 unative_t sys_ipc_call_sync_fast(unative_t phoneid, unative_t method, 257 unative_t arg1, ipc_data_t *data) 258 258 { 259 259 call_t call; … … 278 278 279 279 /** Synchronous IPC call allowing to send whole message */ 280 __native sys_ipc_call_sync(__nativephoneid, ipc_data_t *question,280 unative_t sys_ipc_call_sync(unative_t phoneid, ipc_data_t *question, 281 281 ipc_data_t *reply) 282 282 { … … 289 289 rc = copy_from_uspace(&call.data.args, &question->args, sizeof(call.data.args)); 290 290 if (rc != 0) 291 return ( __native) rc;291 return (unative_t) rc; 292 292 293 293 GET_CHECK_PHONE(phone, phoneid, return ENOENT); … … 324 324 -2 on 'Too many async request, handle answers first 325 325 */ 326 __native sys_ipc_call_async_fast(__native phoneid, __nativemethod,327 __native arg1, __nativearg2)326 unative_t sys_ipc_call_async_fast(unative_t phoneid, unative_t method, 327 unative_t arg1, unative_t arg2) 328 328 { 329 329 call_t *call; … … 347 347 ipc_backsend_err(phone, call, res); 348 348 349 return ( __native) call;349 return (unative_t) call; 350 350 } 351 351 … … 354 354 * @return The same as sys_ipc_call_async 355 355 */ 356 __native sys_ipc_call_async(__nativephoneid, ipc_data_t *data)356 unative_t sys_ipc_call_async(unative_t phoneid, ipc_data_t *data) 357 357 { 358 358 call_t *call; … … 370 370 if (rc != 0) { 371 371 ipc_call_free(call); 372 return ( __native) rc;372 return (unative_t) rc; 373 373 } 374 374 if (!(res=request_preprocess(call))) … … 377 377 ipc_backsend_err(phone, call, res); 378 378 379 return ( __native) call;379 return (unative_t) call; 380 380 } 381 381 … … 387 387 * arg3 is not rewritten for certain system IPC 388 388 */ 389 __native sys_ipc_forward_fast(__native callid, __nativephoneid,390 __native method, __nativearg1)389 unative_t sys_ipc_forward_fast(unative_t callid, unative_t phoneid, 390 unative_t method, unative_t arg1) 391 391 { 392 392 call_t *call; … … 429 429 430 430 /** Send IPC answer */ 431 __native sys_ipc_answer_fast(__native callid, __nativeretval,432 __native arg1, __nativearg2)431 unative_t sys_ipc_answer_fast(unative_t callid, unative_t retval, 432 unative_t arg1, unative_t arg2) 433 433 { 434 434 call_t *call; … … 460 460 461 461 /** Send IPC answer */ 462 __native sys_ipc_answer(__nativecallid, ipc_data_t *data)462 unative_t sys_ipc_answer(unative_t callid, ipc_data_t *data) 463 463 { 464 464 call_t *call; … … 494 494 * 495 495 */ 496 __nativesys_ipc_hangup(int phoneid)496 unative_t sys_ipc_hangup(int phoneid) 497 497 { 498 498 phone_t *phone; … … 514 514 * @return Callid, if callid & 1, then the call is answer 515 515 */ 516 __native sys_ipc_wait_for_call(ipc_data_t *calldata, __u32usec, int flags)516 unative_t sys_ipc_wait_for_call(ipc_data_t *calldata, uint32_t usec, int flags) 517 517 { 518 518 call_t *call; … … 533 533 ipc_call_free(call); 534 534 535 return (( __native)call) | IPC_CALLID_NOTIFICATION;535 return ((unative_t)call) | IPC_CALLID_NOTIFICATION; 536 536 } 537 537 … … 551 551 ipc_call_free(call); 552 552 553 return (( __native)call) | IPC_CALLID_ANSWERED;553 return ((unative_t)call) | IPC_CALLID_ANSWERED; 554 554 } 555 555 … … 562 562 return 0; 563 563 } 564 return ( __native)call;564 return (unative_t)call; 565 565 } 566 566 567 567 /** Connect irq handler to task */ 568 __nativesys_ipc_register_irq(int irq, irq_code_t *ucode)568 unative_t sys_ipc_register_irq(int irq, irq_code_t *ucode) 569 569 { 570 570 if (!(cap_get(TASK) & CAP_IRQ_REG)) … … 572 572 573 573 if (irq >= IRQ_COUNT || irq <= -IPC_IRQ_RESERVED_VIRTUAL) 574 return ( __native) ELIMIT;574 return (unative_t) ELIMIT; 575 575 576 576 irq_ipc_bind_arch(irq); … … 580 580 581 581 /* Disconnect irq handler from task */ 582 __nativesys_ipc_unregister_irq(int irq)582 unative_t sys_ipc_unregister_irq(int irq) 583 583 { 584 584 if (!(cap_get(TASK) & CAP_IRQ_REG)) … … 586 586 587 587 if (irq >= IRQ_COUNT || irq <= -IPC_IRQ_RESERVED_VIRTUAL) 588 return ( __native) ELIMIT;588 return (unative_t) ELIMIT; 589 589 590 590 ipc_irq_unregister(&TASK->answerbox, irq);
Note:
See TracChangeset
for help on using the changeset viewer.