Changeset 7f1c620 in mainline for generic/src/ipc/sysipc.c


Ignore:
Timestamp:
2006-07-04T17:17:56Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0ffa3ef5
Parents:
991779c5
Message:

Replace old u?? types with respective C99 variants (e.g. uint32_t, int64_t, uintptr_t etc.).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/src/ipc/sysipc.c

    r991779c5 r7f1c620  
    5757
    5858/** Return true if the method is a system method */
    59 static inline int is_system_method(__native method)
     59static inline int is_system_method(unative_t method)
    6060{
    6161        if (method <= IPC_M_LAST_SYSTEM)
     
    6969 *   it is useless
    7070 */
    71 static inline int is_forwardable(__native method)
     71static inline int is_forwardable(unative_t method)
    7272{
    7373        if (method == IPC_M_PHONE_HUNGUP || method == IPC_M_AS_AREA_SEND \
     
    132132                        phone_connect(phoneid,&answer->sender->answerbox);
    133133                        /* 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]);
    135135                }
    136136        } else if (IPC_GET_METHOD(*olddata) == IPC_M_CONNECT_ME_TO) {
     
    192192                        return ELIMIT;
    193193                /* 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]);
    195195                call->flags |= IPC_CALL_CONN_ME_TO;
    196196                call->private = newphid;
     
    254254           -2 on 'Too many async request, handle answers first
    255255 */
    256 __native sys_ipc_call_sync_fast(__native phoneid, __native method,
    257                                 __native arg1, ipc_data_t *data)
     256unative_t sys_ipc_call_sync_fast(unative_t phoneid, unative_t method,
     257                                unative_t arg1, ipc_data_t *data)
    258258{
    259259        call_t call;
     
    278278
    279279/** Synchronous IPC call allowing to send whole message */
    280 __native sys_ipc_call_sync(__native phoneid, ipc_data_t *question,
     280unative_t sys_ipc_call_sync(unative_t phoneid, ipc_data_t *question,
    281281                           ipc_data_t *reply)
    282282{
     
    289289        rc = copy_from_uspace(&call.data.args, &question->args, sizeof(call.data.args));
    290290        if (rc != 0)
    291                 return (__native) rc;
     291                return (unative_t) rc;
    292292
    293293        GET_CHECK_PHONE(phone, phoneid, return ENOENT);
     
    324324           -2 on 'Too many async request, handle answers first
    325325 */
    326 __native sys_ipc_call_async_fast(__native phoneid, __native method,
    327                                  __native arg1, __native arg2)
     326unative_t sys_ipc_call_async_fast(unative_t phoneid, unative_t method,
     327                                 unative_t arg1, unative_t arg2)
    328328{
    329329        call_t *call;
     
    347347                ipc_backsend_err(phone, call, res);
    348348
    349         return (__native) call;
     349        return (unative_t) call;
    350350}
    351351
     
    354354 * @return The same as sys_ipc_call_async
    355355 */
    356 __native sys_ipc_call_async(__native phoneid, ipc_data_t *data)
     356unative_t sys_ipc_call_async(unative_t phoneid, ipc_data_t *data)
    357357{
    358358        call_t *call;
     
    370370        if (rc != 0) {
    371371                ipc_call_free(call);
    372                 return (__native) rc;
     372                return (unative_t) rc;
    373373        }
    374374        if (!(res=request_preprocess(call)))
     
    377377                ipc_backsend_err(phone, call, res);
    378378
    379         return (__native) call;
     379        return (unative_t) call;
    380380}
    381381
     
    387387 *          arg3 is not rewritten for certain system IPC
    388388 */
    389 __native sys_ipc_forward_fast(__native callid, __native phoneid,
    390                               __native method, __native arg1)
     389unative_t sys_ipc_forward_fast(unative_t callid, unative_t phoneid,
     390                              unative_t method, unative_t arg1)
    391391{
    392392        call_t *call;
     
    429429
    430430/** Send IPC answer */
    431 __native sys_ipc_answer_fast(__native callid, __native retval,
    432                              __native arg1, __native arg2)
     431unative_t sys_ipc_answer_fast(unative_t callid, unative_t retval,
     432                             unative_t arg1, unative_t arg2)
    433433{
    434434        call_t *call;
     
    460460
    461461/** Send IPC answer */
    462 __native sys_ipc_answer(__native callid, ipc_data_t *data)
     462unative_t sys_ipc_answer(unative_t callid, ipc_data_t *data)
    463463{
    464464        call_t *call;
     
    494494 *
    495495 */
    496 __native sys_ipc_hangup(int phoneid)
     496unative_t sys_ipc_hangup(int phoneid)
    497497{
    498498        phone_t *phone;
     
    514514 * @return Callid, if callid & 1, then the call is answer
    515515 */
    516 __native sys_ipc_wait_for_call(ipc_data_t *calldata, __u32 usec, int flags)
     516unative_t sys_ipc_wait_for_call(ipc_data_t *calldata, uint32_t usec, int flags)
    517517{
    518518        call_t *call;
     
    533533                ipc_call_free(call);
    534534               
    535                 return ((__native)call) | IPC_CALLID_NOTIFICATION;
     535                return ((unative_t)call) | IPC_CALLID_NOTIFICATION;
    536536        }
    537537
     
    551551                ipc_call_free(call);
    552552
    553                 return ((__native)call) | IPC_CALLID_ANSWERED;
     553                return ((unative_t)call) | IPC_CALLID_ANSWERED;
    554554        }
    555555
     
    562562                return 0;
    563563        }
    564         return (__native)call;
     564        return (unative_t)call;
    565565}
    566566
    567567/** Connect irq handler to task */
    568 __native sys_ipc_register_irq(int irq, irq_code_t *ucode)
     568unative_t sys_ipc_register_irq(int irq, irq_code_t *ucode)
    569569{
    570570        if (!(cap_get(TASK) & CAP_IRQ_REG))
     
    572572
    573573        if (irq >= IRQ_COUNT || irq <= -IPC_IRQ_RESERVED_VIRTUAL)
    574                 return (__native) ELIMIT;
     574                return (unative_t) ELIMIT;
    575575       
    576576        irq_ipc_bind_arch(irq);
     
    580580
    581581/* Disconnect irq handler from task */
    582 __native sys_ipc_unregister_irq(int irq)
     582unative_t sys_ipc_unregister_irq(int irq)
    583583{
    584584        if (!(cap_get(TASK) & CAP_IRQ_REG))
     
    586586
    587587        if (irq >= IRQ_COUNT || irq <= -IPC_IRQ_RESERVED_VIRTUAL)
    588                 return (__native) ELIMIT;
     588                return (unative_t) ELIMIT;
    589589
    590590        ipc_irq_unregister(&TASK->answerbox, irq);
Note: See TracChangeset for help on using the changeset viewer.